From: Junio C Hamano Date: Sun, 31 Mar 2013 22:19:52 +0000 (-0700) Subject: peel_onion: disambiguate to favor tree-ish when we know we want a tree-ish X-Git-Tag: v1.8.3-rc0~118^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ed1ca6025f965360e42ece66dcbc78bf0c2099a9?ds=inline;hp=ed1ca6025f965360e42ece66dcbc78bf0c2099a9 peel_onion: disambiguate to favor tree-ish when we know we want a tree-ish The function already knows when interpreting $foo^{commit} to tell the underlying get_sha1_1() to expect a commit-ish while evaluating $foo. Teach it to do the same when asked for $foo^{tree}; we are expecting a tree-ish and $foo should be disambiguated in favor of a tree-ish, discarding a possible ambiguous match with a blob object. Signed-off-by: Junio C Hamano ---