git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [TopGit PATCH] branch_annihilated: don't use _name as temporary variable
@ 2010-10-09  7:50 Bert Wesarg
  0 siblings, 0 replies; only message in thread
From: Bert Wesarg @ 2010-10-09  7:50 UTC (permalink / raw)
  To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg

_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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-09  7:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-09  7:50 [TopGit PATCH] branch_annihilated: don't use _name as temporary variable Bert Wesarg

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).