Thread (27 messages) flat view 27 messages, 2 authors, 2016-06-16

Re: [PATCH v2 14/22] i18n: rebase-interactive: mark strings for translation

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:19:37

Vasco Almeida [off-list ref] writes:
quoted hunk ↗ jump to hunk
@@ -222,9 +223,10 @@ has_action () {
 }
 
 is_empty_commit() {
-	tree=$(git rev-parse -q --verify "$1"^{tree} 2>/dev/null ||
-		die "$1: not a commit that can be picked")
-	ptree=$(git rev-parse -q --verify "$1"^^{tree} 2>/dev/null ||
+	sha1=$1
+	tree=$(git rev-parse -q --verify "$sha1"^{tree} 2>/dev/null ||
+		die "$(eval_gettext "\$sha1: not a commit that can be picked")")
+	ptree=$(git rev-parse -q --verify "$sha1"^^{tree} 2>/dev/null ||
 		ptree=4b825dc642cb6eb9a060e54bf8d69288fbee4904)
 	test "$tree" = "$ptree"
 }
Both of the two callsites of this function use the variable $sha1,
and at least one of them uses that variable after this function
returns, but they pass it as the first parameter to this function,
so the assignment added by this patch does not break them, which is
good.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help