chiark / gitweb /
Pass -- to diff-tree for branch/filename disambiguation
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 7 Mar 2009 20:01:30 +0000 (21:01 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 7 Mar 2009 20:01:30 +0000 (21:01 +0100)
Script to show the need of this patch:

mkdir ty;
cd ty;
git init-db;
touch a;
git add a;
git commit -m "...";
tg create bla;
git commit -m "...";
mkdir bla;
touch bla/blub;
git add bla/blub;
git commit -m "...";
tg export --quilt tt;

Reported-by: "Bernhard R. Link" <brlink@debian.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
tg.sh

diff --git a/tg.sh b/tg.sh
index 3af2cd8bbbfa78b0f7826192cffab929b4b54586..43d1c9f69c6ab3dc7639598568ca7ccec9411ae0 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -226,7 +226,7 @@ needs_update()
 # branch_empty NAME
 branch_empty()
 {
-       [ -z "$(git diff-tree "refs/top-bases/$1" "$1" | fgrep -v "     .top")" ]
+       [ -z "$(git diff-tree "refs/top-bases/$1" "$1" -- | fgrep -v "  .top")" ]
 }
 
 # switch_to_base NAME [SEED]