mbox series

[GSoC,v2,0/2] rebase -i: support --committer-date-is-author-date

Message ID 20190718190314.20549-1-rohit.ashiwal265@gmail.com (mailing list archive)
Headers show
Series rebase -i: support --committer-date-is-author-date | expand

Message

Rohit Ashiwal July 18, 2019, 7:03 p.m. UTC
Another revision to keep this thread alive.

Rohit Ashiwal (2):
  sequencer: add NULL checks under read_author_script
  rebase -i: support --committer-date-is-author-date

 Documentation/git-rebase.txt            |  7 ++-
 builtin/rebase.c                        | 23 +++++++--
 sequencer.c                             | 62 +++++++++++++++++++++++--
 sequencer.h                             |  1 +
 t/t3422-rebase-incompatible-options.sh  |  1 -
 t/t3431-rebase-options-compatibility.sh | 21 +++++++++
 6 files changed, 103 insertions(+), 12 deletions(-)

Range-diff:
1:  6d2a5a382d ! 1:  a1bb91fe43 rebase -i: add --ignore-whitespace flag
    @@ -85,6 +85,15 @@
      		OPT_STRING(0, "strategy", &opts.strategy, N_("strategy"),
      			   N_("rebase strategy")),
      		OPT_STRING(0, "strategy-opts", &opts.strategy_opts, N_("strategy-opts"),
    +@@
    + 	argc = parse_options(argc, argv, NULL, options,
    + 			builtin_rebase_interactive_usage, PARSE_OPT_KEEP_ARGV0);
    + 
    ++	opts.strategy_opts = xstrdup_or_null(opts.strategy_opts);
    ++
    + 	if (!is_null_oid(&squash_onto))
    + 		opts.squash_onto = &squash_onto;
    + 
     @@
      	am.git_cmd = 1;
      	argv_array_push(&am.args, "am");
2:  3e6a67410c = 2:  597d282fa6 sequencer: add NULL checks under read_author_script
3:  3d5f2e2960 ! 3:  33cfc0f890 rebase -i: support --committer-date-is-author-date
    @@ -262,14 +262,20 @@
      	test_cmp expect file
      '
      
    -+test_expect_success '--committer-date-is-author-date works with interactive backend' '
    ++test_expect_success '--committer-date-is-author-date works with am backend' '

    It is implied that --force-rebase will change the committer date.
    We can add a test (somewhere else) that will check so, but that will
    be moot IMO.

     +	git rebase -f HEAD^ &&
    ++	git rebase --committer-date-is-author-date HEAD^ &&
     +	git cat-file commit HEAD | sed -e "/^\$/q" >head &&
     +	sed -ne "/^author /s/.*> //p" head >authortime &&
     +	sed -ne "/^committer /s/.*> //p" head >committertime &&
    -+	! test_cmp at ct &&
    ++	test_cmp authortime committertime
    ++'
    ++
    ++test_expect_success '--committer-date-is-author-date works with interactive backend' '
    ++	git rebase -f HEAD^ &&
     +	git rebase -i --committer-date-is-author-date HEAD^ &&
     +	git cat-file commit HEAD | sed -e "/^\$/q" >head &&
    ++	sed -ne "/^author /s/.*> //p" head >authortime &&
     +	sed -ne "/^committer /s/.*> //p" head >committertime &&
     +	test_cmp authortime committertime
     +'

Comments

Junio C Hamano July 19, 2019, 9:26 p.m. UTC | #1
Rohit Ashiwal <rohit.ashiwal265@gmail.com> writes:

> Another revision to keep this thread alive.

And on top of what commit have these two been built on?
Junio C Hamano July 19, 2019, 9:47 p.m. UTC | #2
Junio C Hamano <gitster@pobox.com> writes:

> Rohit Ashiwal <rohit.ashiwal265@gmail.com> writes:
>
>> Another revision to keep this thread alive.
>
> And on top of what commit have these two been built on?

I had trouble figuring out where to base the other one, on top of
which these two apply.  Why are these split into separate topics?