[TopGit PATCH] branch_annihilated: don't use _name as temporary variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



_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@xxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]