git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
	Ramkumar Ramachandra <artagnon@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>,
	Thomas Rast <trast@inf.ethz.ch>
Subject: Re: [PATCH v2 5/8] sequencer: run post-rewrite hook
Date: Mon, 3 Jun 2013 16:01:44 -0500	[thread overview]
Message-ID: <CAMP44s09aczdrObG2ZQxOXx_AodsfYRv1N9efLEg6Dj3Y7Fv9A@mail.gmail.com> (raw)
In-Reply-To: <7vhahfdnu6.fsf@alter.siamese.dyndns.org>

On Mon, Jun 3, 2013 at 1:57 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> As we should.
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>  sequencer.c | 45 ++++++++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 44 insertions(+), 1 deletion(-)
>>
>> diff --git a/sequencer.c b/sequencer.c
>> index c217716..3aa480e 100644
>> --- a/sequencer.c
>> +++ b/sequencer.c
>> @@ -127,6 +127,37 @@ static void add_rewritten(unsigned char *from, unsigned char *to)
>>       rewritten.nr++;
>>  }
>>
>> +static void run_rewrite_hook(void)
>> +{
>> +     struct strbuf buf = STRBUF_INIT;
>> +     struct child_process proc;
>> +     const char *argv[3];
>> +     int code, i;
>> +
>> +     argv[0] = find_hook("post-rewrite");
>> +     if (!argv[0])
>> +             return;
>> +
>> +     argv[1] = "rebase";
>> +     argv[2] = NULL;
>
> When the end-user action is "git cherry-pick A..B", shouldn't
> the rewrite hook be called with "cherry-pick" not "rebase" as its
> first argument?

Indeed.

> More importantly, doesn't "git revert A..B" also trigger the
> codepath for [4/8] and hence this function?

True.

> I think [3/8] --skip-empty makes sense also for revert, but I do not
> think this one does as-is.  As what [4/8] introduces is a record of
> "rewrite", the patch does not make sense either.  These two steps
> would want to limit themselves to cherry-pick only, no?

Probably.

-- 
Felipe Contreras

  reply	other threads:[~2013-06-03 21:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29  3:56 [PATCH v2 0/8] cherry-pick: improvements Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 1/8] sequencer: remove useless indentation Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 2/8] sequencer: trivial fix Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 3/8] cherry-pick: add --skip-empty option Felipe Contreras
2013-06-03 18:40   ` Junio C Hamano
2013-06-03 19:21     ` Junio C Hamano
2013-06-03 21:10     ` Felipe Contreras
2013-06-03 21:45       ` Junio C Hamano
2013-06-04 17:10         ` Felipe Contreras
2013-06-04 17:35           ` Junio C Hamano
2013-06-04 17:40             ` Felipe Contreras
2013-06-04 18:30               ` Junio C Hamano
2013-06-05 14:52                 ` Felipe Contreras
2013-06-05 18:13                   ` Junio C Hamano
2013-06-06  5:01                     ` Felipe Contreras
2013-06-04  6:31       ` Antoine Pelisse
2013-05-29  3:56 ` [PATCH v2 4/8] cherry-pick: store rewritten commits Felipe Contreras
2013-06-03 18:49   ` Junio C Hamano
2013-06-03 20:55     ` Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 5/8] sequencer: run post-rewrite hook Felipe Contreras
2013-06-03 18:57   ` Junio C Hamano
2013-06-03 21:01     ` Felipe Contreras [this message]
2013-06-04  9:03     ` Thomas Rast
2013-05-29  3:56 ` [PATCH v2 6/8] cherry-pick: add support to copy notes Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 7/8] revert/cherry-pick: add --quiet option Felipe Contreras
2013-05-29 12:33   ` Ramkumar Ramachandra
2013-05-29 13:28     ` Felipe Contreras
2013-05-29 13:32       ` Ramkumar Ramachandra
2013-05-29 13:40         ` Felipe Contreras
2013-06-03 18:59   ` Junio C Hamano
2013-05-29  3:56 ` [PATCH v2 8/8] revert/cherry-pick: add --skip option Felipe Contreras
2013-05-29 12:27   ` Ramkumar Ramachandra
2013-05-29 13:27     ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMP44s09aczdrObG2ZQxOXx_AodsfYRv1N9efLEg6Dj3Y7Fv9A@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=trast@inf.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).