Skip to content

Commit 3f3abe3

Browse files
Michael J Grubergitster
authored andcommitted
git-rev-parse.txt: Document ":path" specifier
The empty treeish in ":path" means "index". This is actually a special case of the ":stage:path" syntax where it is documented, but mentioning it also together with "treeish:path" is helpful, so do it. Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a4c2454 commit 3f3abe3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/git-rev-parse.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
291291

292292
* A suffix ':' followed by a path; this names the blob or tree
293293
at the given path in the tree-ish object named by the part
294-
before the colon.
294+
before the colon. ":path" (with an empty part before the colon)
295+
is a special case of the syntax described next: content
296+
recorded in the index at the given path.
295297

296298
* A colon, optionally followed by a stage number (0 to 3) and a
297299
colon, followed by a path; this names a blob object in the

0 commit comments

Comments
 (0)