chiark / gitweb /
hooks/pre-commit.sh: don't wail on detached head for missing .top* files
[topgit.git] / tg.sh
diff --git a/tg.sh b/tg.sh
index f0496f1b6ade99b1f9290f3cc5fe7096fc4373ba..43d1c9f69c6ab3dc7639598568ca7ccec9411ae0 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -3,7 +3,7 @@
 # (c) Petr Baudis <pasky@suse.cz>  2008
 # GPLv2
 
-TG_VERSION=0.6
+TG_VERSION=0.7
 
 ## Auxiliary functions
 
@@ -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]