summaryrefslogtreecommitdiff
path: root/t/t0002-gitfile.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-10-19 13:55:49 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-10-19 13:58:15 -0700
commit55956350024f0706294001cb50d513cf0fa038a1 (patch)
tree69734f107e5d2aa719e8c8c1ef4a623b77658519 /t/t0002-gitfile.sh
parentresolve_ref(): expose REF_ISBROKEN flag (diff)
downloadtgif-55956350024f0706294001cb50d513cf0fa038a1.tar.xz
resolve_ref(): report breakage to the caller without warning
629cd3a (resolve_ref(): emit warnings for improperly-formatted references, 2011-09-15) made resolve_ref() warn against files that are found in the directories the ref dwimmery looks at. The intent may be good, but these messages come from a wrong level of the API hierarchy. Instead record the breakage in "flags" whose purpose is to explain the result of the function to the caller, who is in a much better position to make intelligent decision based on the information. This updates sha1_name.c::dwim_ref() to warn against such a broken candidate only when it does not appear directly below $GIT_DIR to restore the traditional behaviour, as we know many files directly underneath $GIT_DIR/ are not refs. Warning against "git show config --" with "$GIT_DIR/config does not look like a well-formed ref" does not make sense, and we may later tweak the dwimmery not to even consider them as candidates, but that is a longer term topic. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0002-gitfile.sh')
0 files changed, 0 insertions, 0 deletions