chiark / gitweb /
measure_branch(): Use _bname instead of _name local variable
authorPetr Baudis <pasky@suse.cz>
Sun, 10 Aug 2008 19:59:05 +0000 (21:59 +0200)
committerPetr Baudis <pasky@suse.cz>
Sun, 10 Aug 2008 19:59:05 +0000 (21:59 +0200)
tg.sh

diff --git a/tg.sh b/tg.sh
index d838bf6..146cdda 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -60,11 +60,11 @@ setup_ours()
 # measure_branch NAME [BASE]
 measure_branch()
 {
-       _name="$1"; _base="$2"
-       [ -n "$_base" ] || _base="refs/top-bases/$_name"
+       _bname="$1"; _base="$2"
+       [ -n "$_base" ] || _base="refs/top-bases/$_bname"
        # The caller should've verified $name is valid
-       _commits="$(git rev-list "$_name" ^"$_base" | wc -l)"
-       _nmcommits="$(git rev-list --no-merges "$_name" ^"$_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