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>
This commit is contained in:
parent
2c619db884
commit
477ff5b71a
@ -926,7 +926,7 @@ file such that it contained the given content either before or after the
|
||||
commit. You can find out with this:
|
||||
|
||||
-------------------------------------------------
|
||||
$ git log --raw --abbrev=40 --pretty=oneline -- filename |
|
||||
$ git log --raw --abbrev=40 --pretty=oneline |
|
||||
grep -B 1 `git hash-object filename`
|
||||
-------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user