@matheusbsbs / matheus-bagliano / commits / 81ab1cb43a
Fork 0

rebase -i: squash should retain the authorship of the _first_ commit

It was determined on the mailing list, that it makes more sense for a "squash" to keep the author of the first commit as the author for the result of the squash. Make it so. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Sep 30, 2007 at 00:34 UTC 81ab1cb43a872fc527b26388bc7e781c816d723b
3 files changed +3 -3
Documentation/git-rebase.txt
+1 -1
@@ -293,7 +293,7 @@ rebasing.
293 If you want to fold two or more commits into one, replace the command
294 "pick" with "squash" for the second and subsequent commit. If the
295 commits had different authors, it will attribute the squashed commit to
296 -the author of the last commit.
296 +the author of the first commit.
297
298 In both cases, or when a "pick" does not succeed (because of merge
299 errors), the loop will stop to let you fix things, and you can continue
git-rebase--interactive.sh
+1 -1
@@ -261,9 +261,9 @@ do_next () {
261 esac
262
263 failed=f
264 + author_script=$(get_author_ident_from_commit HEAD)
265 output git reset --soft HEAD^
266 pick_one -n $sha1 || failed=t
266 - author_script=$(get_author_ident_from_commit $sha1)
267 echo "$author_script" > "$DOTEST"/author-script
268 case $failed in
269 f)
t/t3404-rebase-interactive.sh
+1 -1
@@ -180,7 +180,7 @@ test_expect_success 'squash' '
180 '
181
182 test_expect_success 'retain authorship when squashing' '
183 - git show HEAD | grep "^Author: Nitfol"
183 + git show HEAD | grep "^Author: Twerp Snog"
184 '
185
186 test_expect_success 'preserve merges with -p' '