]> git.ipfire.org Git - thirdparty/git.git/commit - git-sh-setup.sh
sh-setup: add new peel_committish() helper
authorRamkumar Ramachandra <artagnon@gmail.com>
Fri, 14 Jun 2013 13:17:51 +0000 (18:47 +0530)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jun 2013 16:41:03 +0000 (09:41 -0700)
commitbac1ddd0f86bc5955c24f89e402de80d2844efb5
tree7e279003ab07e34fb9220a43d53455dbafd8d6b2
parent6567dc05a34948b959864b12fcd59a35543273f7
sh-setup: add new peel_committish() helper

The normal way to check whether a certain revision resolves to a valid
commit is:

  $ git rev-parse --verify $REV^0

Unfortunately, this does not work when $REV is of the type :/quuxery.
Write a helper to work around this limitation.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-sh-setup.sh