Skip to content

Commit

Permalink
manual: Fix example finding commits referencing given content.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ralf Wildenhues authored and Shawn O. Pearce committed Oct 16, 2007
1 parent 2c619db commit 477ff5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`
-------------------------------------------------

Expand Down

0 comments on commit 477ff5b

Please sign in to comment.