summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3170a8)
raw | patch | inline | side by side (parent: c3170a8)
author | Christian Couder <chriscool@tuxfamily.org> | |
Tue, 13 May 2008 04:51:41 +0000 (06:51 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 21 May 2008 19:57:18 +0000 (12:57 -0700) |
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rev-parse.txt | patch | blob | history |
index b6b2fe92a15bcb3ea314e5411e957e41e67904d8..69599ffb679b17ebbe6ba85c772cd10a3511d89e 100644 (file)
eval `echo "$OPTS_SPEC" | git-rev-parse --parseopt -- "$@" || echo exit $?`
------------
+EXAMPLES
+--------
+
+* Print the object name of the current commit:
++
+------------
+$ git rev-parse --verify HEAD
+------------
+
+* Print the commit object name from the revision in the $REV shell variable:
++
+------------
+$ git rev-parse --verify $REV
+------------
++
+This will error out if $REV is empty or not a valid revision.
+
+* Same as above:
++
+------------
+$ git rev-parse --default master --verify $REV
+------------
++
+but if $REV is empty, the commit object name from master will be printed.
+
Author
------