From 477ff5b71aca9a3d05c8f83182eeb98d7a8f92ee Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 9 Oct 2007 23:02:19 +0200 Subject: [PATCH] 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 Signed-off-by: Shawn O. Pearce --- Documentation/user-manual.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index b09dcc415..93d20f8a2 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -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` ------------------------------------------------- -- 2.30.2