diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-20 00:55:49 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-20 00:58:15 +0400 |
commit | 55956350024f0706294001cb50d513cf0fa038a1 (patch) | |
tree | 69734f107e5d2aa719e8c8c1ef4a623b77658519 /bisect.c | |
parent | 98ac34b2b1968e16fbf7f6122a53b73c6caaff49 (diff) |
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 'bisect.c')
0 files changed, 0 insertions, 0 deletions