]> git.ipfire.org Git - thirdparty/git.git/commit - sha1-name.c
get_sha1: teach ":$n:<path>" the same relative path logic
authorJunio C Hamano <gitster@pobox.com>
Thu, 9 Dec 2010 21:38:05 +0000 (13:38 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Dec 2010 21:38:05 +0000 (13:38 -0800)
commit3d6e0f745e5b958387c9116ff5ba6247b990e6e7
treef4b3b7e72272491fa01df6c8a750f4bcdf648f1a
parent979f792951913d75f992f87022b75610303a614f
get_sha1: teach ":$n:<path>" the same relative path logic

We taught the object name parser to take ":./<path>", ":../<path>", etc.
and understand them to be relative to the current working directory.

Given that ":<path>" is just a short-hand for ":0:<path>" (i.e. "take
stage #0 of that path"), we should allow ":$n:<path>" to interpret them
the same way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c
t/t1506-rev-parse-diagnosis.sh