chiark / gitweb /
Pass -- to rev-list for branch/filename disambiguation
authorMarc Weber <marco-oweber@gmx.de>
Fri, 21 Nov 2008 09:05:30 +0000 (10:05 +0100)
committermartin f. krafft <madduck@debian.org>
Fri, 21 Nov 2008 09:05:30 +0000 (10:05 +0100)
While playing around it happened that I called the topic branch and
a file "foo"... Here is a small incomplete patch: I've not tried to
catch all of these errors..

Signed-off-by: martin f. krafft <madduck@debian.org>
tg.sh

diff --git a/tg.sh b/tg.sh
index d8b6213..8c23d26 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -63,8 +63,8 @@ measure_branch()
        _bname="$1"; _base="$2"
        [ -n "$_base" ] || _base="refs/top-bases/$_bname"
        # The caller should've verified $name is valid
        _bname="$1"; _base="$2"
        [ -n "$_base" ] || _base="refs/top-bases/$_bname"
        # The caller should've verified $name is valid
-       _commits="$(git rev-list "$_bname" ^"$_base" | wc -l)"
-       _nmcommits="$(git rev-list --no-merges "$_bname" ^"$_base" | wc -l)"
+       _commits="$(git rev-list "$_bname" ^"$_base" -- | wc -l)"
+       _nmcommits="$(git rev-list --no-merges "$_bname" ^"$_base" -- | wc -l)"
        if [ $_commits -gt 1 ]; then
                _suffix="commits"
        else
        if [ $_commits -gt 1 ]; then
                _suffix="commits"
        else