Thread (11 messages) flat view 11 messages, 2 authors, 2016-06-15

Re: [PATCHv6 4/6] add tests of commit --fixup

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:55

"Pat Notz" [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index 256c4c9..f9a26c8 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -133,4 +133,31 @@ do
 	'
 done
 
+test_commit_autosquash_flags () {
+	H=$1
+	flag=$2
+	test_expect_success "commit --$flag with $H encoding" '
+		git config i18n.commitencoding $H &&
+		git checkout -b $H-$flag C0 &&
+		echo $H >>F &&
+		git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
+		test_tick &&
+		echo intermediate stuff >>G &&
+		git add G &&
+		git commit -a -m "intermediate commit" &&
+		test_tick &&
+		echo $H $flag >>F &&
+		git commit -a --$flag HEAD~1 $3 &&
+		E=$(git cat-file commit '$H-$flag' | \
+			sed -ne "s/^encoding //p") &&
+		test "z$E" = "z'$H'" &&
A few nits.

 - You don't need that backslash after the pipe (with the vertical bar at
   the end of line the shell knows you haven't finished your statement).

 - I am not sure what the single-quote around only the last two occurrence
   of $H are about.  H and flag are used as part of branch name, so I
   suspect you do not need any quoting around them, no?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help