* [PATCH] cg-log: also search the initial commit for files
@ 2005-06-02 13:10 Jonas Fonseca
0 siblings, 0 replies; only message in thread
From: Jonas Fonseca @ 2005-06-02 13:10 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
When restricting the log to a set of files pass --root to git-diff-tree if
no parent is found so the initial commit is also checked.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
cg-log | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/cg-log b/cg-log
--- a/cg-log
+++ b/cg-log
@@ -167,7 +167,9 @@ $revls | $revsort | while read time comm
[ "$revfmt" = "git-rev-list" ] && commit="$time"
if [ $# -ne 0 ]; then
parent=$(git-cat-file commit $commit | sed -n '2s/parent //p;2Q')
- [ "$parent" ] && [ "$(git-diff-tree -r $commit $parent "$@")" ] || continue
+ diff_ops=
+ [ "$parent" ] || diff_ops=--root
+ [ "$(git-diff-tree -r $diff_ops $commit $parent "$@")" ] || continue
fi
if [ "$user" ]; then
git-cat-file commit $commit | grep -e '^author ' -e '^committer ' | grep -qi "$user" || continue
--
Jonas Fonseca
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-02 13:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-02 13:10 [PATCH] cg-log: also search the initial commit for files Jonas Fonseca
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).