]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/git-rev-parse.txt
rev-parse: clarify documentation for the --verify option
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 30 Mar 2013 06:44:25 +0000 (07:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Apr 2013 15:41:17 +0000 (08:41 -0700)
commit2db60670ba0c6dcaa42ed420f337851eea800bbc
treee904edfac5450f7d112c744e1d98b8e6bab639c7
parenta6a3f2cc0761a347e8796280a1544e2a0d08cb51
rev-parse: clarify documentation for the --verify option

The old version could be read to mean that the argument has to refer
to a valid object, but that is incorrect:

* the object is not necessarily read (e.g., to check for corruption)

* if the argument is a 40-digit string of hex digits, then it is
  accepted whether or not is is the name of an existing object.

So reword the explanation to be less ambiguous.

Also fix the examples involving --verify: to be sure that the argument
refers to a commit (rather than some other kind of object), the
argument has to be suffixed with "^{commit}".  This trick is not
possible in the example involving --default, so don't imply that it is
exactly the same as the previous example.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rev-parse.txt