git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Cc: git@vger.kernel.org, pasky@suse.cz,
	martin f krafft <madduck@madduck.net>,
	Bert Wesarg <bert.wesarg@googlemail.com>
Subject: [TopGit PATCH] branch_annihilated: don't use _name as temporary variable
Date: Sat,  9 Oct 2010 09:50:20 +0200	[thread overview]
Message-ID: <efdb8c3889e39a36efc328acb1a5e5f55c24be5a.1286610589.git.bert.wesarg@googlemail.com> (raw)

_name is used in recurse_deps as an external global. Be on the safe side
and don't use a local variable in branch_annihilated.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
 tg.sh |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/tg.sh b/tg.sh
index 3718702..b3c5004 100644 tg.sh
--- a/tg.sh
+++ b/tg.sh
@@ -120,12 +120,10 @@ has_remote()
 
 branch_annihilated()
 {
-	_name="$1";
-
 	# use the merge base in case the base is ahead.
-	mb="$(git merge-base "refs/top-bases/$_name" "$_name")";
+	mb="$(git merge-base "refs/top-bases/$1" "$1")";
 
-	test "$(git rev-parse "$mb^{tree}")" = "$(git rev-parse "$_name^{tree}")";
+	test "$(git rev-parse "$mb^{tree}")" = "$(git rev-parse "$1^{tree}")";
 }
 
 # is_sha1 REF
-- 
1.7.1.1067.g5aeb7

                 reply	other threads:[~2010-10-09  7:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efdb8c3889e39a36efc328acb1a5e5f55c24be5a.1286610589.git.bert.wesarg@googlemail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=madduck@madduck.net \
    --cc=pasky@suse.cz \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).