@matheusbsbs / matheus-bagliano / commits / 6b09c7883f
Fork 0

Add revspec documentation for ':path', ':[0-3]:path' and git-describe

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

pclouds@gmail.com committed Oct 19, 2006 at 10:04 UTC 6b09c7883f50044a68d93ef6872486bad2e93a9d
1 file changed +15 -1
Documentation/git-rev-parse.txt
+15 -1
@@ -111,7 +111,9 @@ SPECIFYING REVISIONS
111
112 A revision parameter typically, but not necessarily, names a
113 commit object. They use what is called an 'extended SHA1'
114 -syntax.
114 +syntax. Here are various ways to spell object names. The
115 +ones listed near the end of this list are to name trees and
116 +blobs contained in a commit.
117
118 * The full SHA1 object name (40-byte hexadecimal string), or
119 a substring of such that is unique within the repository.
@@ -119,6 +121,9 @@ syntax.
121 name the same commit object if there are no other object in
122 your repository whose object name starts with dae86e.
123
124 +* An output from `git-describe`; i.e. a closest tag, followed by a
125 + dash, a 'g', and an abbreviated object name.
126 +
127 * A symbolic ref name. E.g. 'master' typically means the commit
128 object referenced by $GIT_DIR/refs/heads/master. If you
129 happen to have both heads/master and tags/master, you can
@@ -156,6 +161,15 @@ syntax.
161 and dereference the tag recursively until a non-tag object is
162 found.
163
164 +* A suffix ':' followed by a path; this names the blob or tree
165 + at the given path in the tree-ish object named by the part
166 + before the colon.
167 +
168 +* A colon, optionally followed by a stage number (0 to 3) and a
169 + colon, followed by a path; this names a blob object in the
170 + index at the given path. Missing stage number (and the colon
171 + that follows it) names an stage 0 entry.
172 +
173 Here is an illustration, by Jon Loeliger. Both node B and C are
174 a commit parents of commit node A. Parent commits are ordered
175 left-to-right.