[PATCH v4 0/5] cleanup ra/rebase-i-more-options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>

Thanks to Danh for the review, I've updated the tests accordingly.

Phillip Wood (2):
  rebase -i: support --committer-date-is-author-date
  rebase -i: support --ignore-date

Rohit Ashiwal (3):
  rebase -i: add --ignore-whitespace flag
  sequencer: rename amend_author to author_to_free
  rebase: add --reset-author-date

 Documentation/git-rebase.txt           |  33 +++-
 builtin/rebase.c                       |  46 ++++--
 sequencer.c                            | 111 ++++++++++++-
 sequencer.h                            |   2 +
 t/t3422-rebase-incompatible-options.sh |   2 -
 t/t3436-rebase-more-options.sh         | 209 +++++++++++++++++++++++++
 6 files changed, 379 insertions(+), 24 deletions(-)
 create mode 100755 t/t3436-rebase-more-options.sh

Range-diff against v3:
1:  df8c4ed2e9 = 1:  df8c4ed2e9 rebase -i: add --ignore-whitespace flag
2:  df44a0bde6 ! 2:  ad21e5d8fb rebase -i: support --committer-date-is-author-date
    @@ t/t3436-rebase-more-options.sh: test_expect_success '--ignore-whitespace is reme
     +test_expect_success '--committer-date-is-author-date works with apply backend' '
     +	GIT_AUTHOR_DATE="@1234 +0300" git commit --amend --reset-author &&
     +	git rebase --apply --committer-date-is-author-date HEAD^ &&
    -+	git log -1 --pretty="format:%ai" >authortime &&
    -+	git log -1 --pretty="format:%ci" >committertime &&
    ++	git log -1 --pretty=%ai >authortime &&
    ++	git log -1 --pretty=%ci >committertime &&
     +	test_cmp authortime committertime
     +'
     +
     +test_expect_success '--committer-date-is-author-date works with merge backend' '
     +	GIT_AUTHOR_DATE="@1234 +0300" git commit --amend --reset-author &&
     +	git rebase -m --committer-date-is-author-date HEAD^ &&
    -+	git log -1 --pretty="format:%ai" >authortime &&
    -+	git log -1 --pretty="format:%ci" >committertime &&
    ++	git log -1 --pretty=%ai >authortime &&
    ++	git log -1 --pretty=%ci >committertime &&
     +	test_cmp authortime committertime
     +'
     +
     +test_expect_success '--committer-date-is-author-date works with rebase -r' '
     +	git checkout side &&
     +	GIT_AUTHOR_DATE="@1234 +0300" git merge --no-ff commit3 &&
     +	git rebase -r --root --committer-date-is-author-date &&
    -+	git log --pretty="format:%ai" >authortime &&
    -+	git log --pretty="format:%ci" >committertime &&
    ++	git log --pretty=%ai >authortime &&
    ++	git log --pretty=%ci >committertime &&
     +	test_cmp authortime committertime
     +'
     +
     +test_expect_success '--committer-date-is-author-date works when forking merge' '
     +	git checkout side &&
     +	GIT_AUTHOR_DATE="@1234 +0300" git merge --no-ff commit3 &&
     +	git rebase -r --root --strategy=resolve --committer-date-is-author-date &&
    -+	git log --pretty="format:%ai" >authortime &&
    -+	git log --pretty="format:%ci" >committertime &&
    ++	git log --pretty=%ai >authortime &&
    ++	git log --pretty=%ci >committertime &&
     +	test_cmp authortime committertime
     +
     +'
3:  fa3d4856b4 = 3:  af92e29cf9 sequencer: rename amend_author to author_to_free
4:  96657233d4 ! 4:  4399dc19b6 rebase -i: support --ignore-date
    @@ t/t3436-rebase-more-options.sh: test_expect_success '--committer-date-is-author-
     +test_expect_success '--ignore-date works with apply backend' '
     +	git commit --amend --date="$GIT_AUTHOR_DATE" &&
     +	git rebase --apply --ignore-date HEAD^ &&
    -+	git log -1 --pretty="format:%ai" >authortime &&
    ++	git log -1 --pretty=%ai >authortime &&
     +	grep "+0000" authortime
     +'
     +
     +test_expect_success '--ignore-date works with merge backend' '
     +	git commit --amend --date="$GIT_AUTHOR_DATE" &&
     +	git rebase --ignore-date -m HEAD^ &&
    -+	git log -1 --pretty="format:%ai" >authortime &&
    ++	git log -1 --pretty=%ai >authortime &&
     +	grep "+0000" authortime
     +'
     +
    @@ t/t3436-rebase-more-options.sh: test_expect_success '--committer-date-is-author-
     +	echo resolved >foo &&
     +	git add foo &&
     +	git rebase --continue &&
    -+	git log --pretty=%ai >authortime &&
    ++	git log -1 --pretty=%ai >authortime &&
     +	grep +0000 authortime
     +'
     +
5:  828155baba ! 5:  a11db78eb4 rebase: add --reset-author-date
    @@ t/t3436-rebase-more-options.sh: test_expect_success '--committer-date-is-author-
      	git commit --amend --date="$GIT_AUTHOR_DATE" &&
     -	git rebase --apply --ignore-date HEAD^ &&
     +	git rebase --apply --reset-author-date HEAD^ &&
    - 	git log -1 --pretty="format:%ai" >authortime &&
    + 	git log -1 --pretty=%ai >authortime &&
      	grep "+0000" authortime
      '
      
    @@ t/t3436-rebase-more-options.sh: test_expect_success '--committer-date-is-author-
      	git commit --amend --date="$GIT_AUTHOR_DATE" &&
     -	git rebase --ignore-date -m HEAD^ &&
     +	git rebase --reset-author-date -m HEAD^ &&
    - 	git log -1 --pretty="format:%ai" >authortime &&
    + 	git log -1 --pretty=%ai >authortime &&
      	grep "+0000" authortime
      '
      

-- 
2.25.1.551.gd3318bf0d3.dirty




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux