Skip to content

Commit 477ff5b

Browse files
Ralf Wildenhuesspearce
authored andcommitted
manual: Fix example finding commits referencing given content.
If I'm handed a file, then it typically lives outside the working directory. git-log only operates on in-tree files, so the first 'filename' should be an in-tree one, or it should look at all files. This patch does the latter, so it would also find renamed files. However, it is also slower. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 2c619db commit 477ff5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/user-manual.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ file such that it contained the given content either before or after the
926926
commit. You can find out with this:
927927

928928
-------------------------------------------------
929-
$ git log --raw --abbrev=40 --pretty=oneline -- filename |
929+
$ git log --raw --abbrev=40 --pretty=oneline |
930930
grep -B 1 `git hash-object filename`
931931
-------------------------------------------------
932932

0 commit comments

Comments
 (0)