]> git.ipfire.org Git - thirdparty/git.git/commit - tree-walk.c
Do not print 'dangling' for cat-file in case of ambiguity
authorDavid Turner <novalis@novalis.org>
Fri, 18 Jan 2019 04:19:43 +0000 (23:19 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Jan 2019 23:22:02 +0000 (15:22 -0800)
commitd1dd94b308607d0a37aa8a013fd20678956d3531
tree76941b07caff798b7e8b45c05d7c88075b087f63
parent16a465bc018d09e9d7bbbdc5f40a7fb99c21f8ef
Do not print 'dangling' for cat-file in case of ambiguity

The return values -1 and -2 from get_oid could mean two different
things, depending on whether they were from an enum returned by
get_tree_entry_follow_symlinks, or from a different code path.  This
caused 'dangling' to be printed from a git cat-file in the case of an
ambiguous (-2) result.

Unify the results of get_oid* and get_tree_entry_follow_symlinks to be
one common type, with unambiguous values.

Signed-off-by: David Turner <novalis@novalis.org>
Reported-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-cat-file.txt
builtin/cat-file.c
cache.h
sha1-name.c
tree-walk.c
tree-walk.h