From: Ralf Wildenhues Date: Tue, 09 Oct 2007 21:02:19 GMT Subject: [PATCH 3/6] manual: Fix example finding commits referencing given content. Message-ID: <20071009210219.GE31317@ins.uni-bonn.de> In-Reply-To: <20071009205755.GB31317@ins.uni-bonn.de> 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. --- Documentation/user-manual.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 6adeca7..2b1b324 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` ------------------------------------------------- -- 1.5.3.3.g34c6d