{"thread":{"id":"25398","subject":"[TopGit PATCH] branch_annihilated: don't use _name as temporary variable","startedAt":"2010-10-09T07:50:20Z","lastAt":"2010-10-09T07:50:20Z","messageCount":1,"participants":["Bert Wesarg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"153046","messageId":"efdb8c3889e39a36efc328acb1a5e5f55c24be5a.1286610589.git.bert.wesarg@googlemail.com","threadId":"25398","inReplyTo":null,"subject":"[TopGit PATCH] branch_annihilated: don't use _name as temporary variable","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-09T07:50:20Z","receivedAt":"2010-10-09T07:50:20Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"_name is used in recurse_deps as an external global. Be on the safe side\nand don't use a local variable in branch_annihilated.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n tg.sh |    6 ++----\n 1 files changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/tg.sh b/tg.sh\nindex 3718702..b3c5004 100644 tg.sh\n--- a/tg.sh\n+++ b/tg.sh\n@@ -120,12 +120,10 @@ has_remote()\n \n branch_annihilated()\n {\n-\t_name=\"$1\";\n-\n \t# use the merge base in case the base is ahead.\n-\tmb=\"$(git merge-base \"refs/top-bases/$_name\" \"$_name\")\";\n+\tmb=\"$(git merge-base \"refs/top-bases/$1\" \"$1\")\";\n \n-\ttest \"$(git rev-parse \"$mb^{tree}\")\" = \"$(git rev-parse \"$_name^{tree}\")\";\n+\ttest \"$(git rev-parse \"$mb^{tree}\")\" = \"$(git rev-parse \"$1^{tree}\")\";\n }\n \n # is_sha1 REF\n-- \n1.7.1.1067.g5aeb7\n"}]}