rebase -i: Improve consistency of commit count in generated commit messages
Use the numeral "2" instead of the word "two" when two commits are being interactively squashed. This makes the treatment consistent with that for higher numbers of commits. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Jan 14, 2010 at 06:54 UTC
5065ed296abc1c0b66ad7c5e963e048cb90b6ee6
2 files changed
+3
-3
git-rebase--interactive.sh
+1
-1
@@ -360,7 +360,7 @@ make_squash_message () {
360
}' <"$SQUASH_MSG"
361
else
362
COUNT=2
363
- echo "# This is a combination of two commits."
363
+ echo "# This is a combination of 2 commits."
364
echo "# The first commit's message is:"
365
echo
366
git cat-file commit HEAD | sed -e '1,/^$/d'
t/t3404-rebase-interactive.sh
+2
-2
@@ -135,7 +135,7 @@ test_expect_success 'squash' '
135
test_tick &&
136
GIT_AUTHOR_NAME="Nitfol" git commit -m "nitfol" file7 &&
137
echo "******************************" &&
138
- FAKE_LINES="1 squash 2" EXPECT_HEADER_COUNT=two \
138
+ FAKE_LINES="1 squash 2" EXPECT_HEADER_COUNT=2 \
139
git rebase -i --onto master HEAD~2 &&
140
test B = $(cat file7) &&
141
test $(git rev-parse HEAD^) = $(git rev-parse master)
@@ -301,7 +301,7 @@ test_expect_success 'squash works as expected' '
301
git commit -m $n
302
done &&
303
one=$(git rev-parse HEAD~3) &&
304
- FAKE_LINES="1 squash 3 2" EXPECT_HEADER_COUNT=two \
304
+ FAKE_LINES="1 squash 3 2" EXPECT_HEADER_COUNT=2 \
305
git rebase -i HEAD~3 &&
306
test $one = $(git rev-parse HEAD~2)
307
'