git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Miklos Vajna <vmiklos@suse.cz>
Cc: git@vger.kernel.org, Robin Stocker <robin@nibor.org>
Subject: Re: [PATCH] cherry-pick: don't forget -s on failure
Date: Wed, 12 Sep 2012 15:45:10 -0700	[thread overview]
Message-ID: <7v8vcec13d.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vd31qc1p3.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Wed, 12 Sep 2012 15:32:08 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> I think we had a separate topic around cherry-pick that needs the
> footer thing accessible from cherry-pick recently ($gmane/204755).
>
> I think the code movement in this patch is a good one.
>
> Thanks.

Having said that, the behaviour after this patch is applied is not
quite right.

A typical .git/MERGE_MSG that is left after "cherry-pick" gives the
control back to you asking for help, with your patch that adds the
sign-off at the end, would look like this:


    cherry-pick: don't forget -s on failure

    In case 'git cherry-pick -s <commit>' failed, the user had to use 'git
    commit -s' (i.e. state the -s option again), which is easy to forget
    about.  Instead, write the signed-off-by line early, so plain 'git
    commit' will have the same result.

    Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

    Conflicts:
            builtin/commit.c

    Signed-off-by: Junio C Hamano <gitster@pobox.com>


Notice two issues?

 - The additional S-o-b should come immediately after the existing
   block of footers.

 - And the last entry in the existing footer block is already mine,
   so there shouldn't have been a new and duplicated one added.


I am not sure how reusable the moved function is without
enhancements for your purpose.  The logic to identify the footer
needs to be enhanced so that an "end" pointer to point at the byte
before the caller added "Conflicts: " can be given, and pretend as
if it is the end of the buffer, unlike in the fresh commit case
where it can consider the real end of the buffer as such.

Or something like that.

  reply	other threads:[~2012-09-12 22:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 19:57 [PATCH] cherry-pick: don't forget -s on failure Miklos Vajna
2012-09-12 22:32 ` Junio C Hamano
2012-09-12 22:45   ` Junio C Hamano [this message]
2012-09-13  7:33     ` [PATCH v2] " Miklos Vajna
2012-09-13 17:04       ` Junio C Hamano
2012-09-13 17:23       ` Junio C Hamano
2012-09-13 20:27         ` [PATCH v3] " Miklos Vajna
2012-09-13 21:13           ` Junio C Hamano
2012-09-14  6:52             ` [PATCH v4] " Miklos Vajna

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=7v8vcec13d.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=robin@nibor.org \
    --cc=vmiklos@suse.cz \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).