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 v2] cherry-pick: don't forget -s on failure
Date: Thu, 13 Sep 2012 10:04:42 -0700	[thread overview]
Message-ID: <7vd31pam6t.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120913073324.GA14383@suse.cz> (Miklos Vajna's message of "Thu, 13 Sep 2012 09:33:25 +0200")

Miklos Vajna <vmiklos@suse.cz> writes:

> 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.
>
> Also update 'git commit -s', so that in case there is already a relevant
> Signed-off-by line before the Conflicts: line, it won't add one more at
> the end of the message.
>
> Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
> ---
>
> On Wed, Sep 12, 2012 at 03:45:10PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
>>  - The additional S-o-b should come immediately after the existing
>>    block of footers.
>
> This was trivial to fix.

Indeed.  Just inserting before starting to add "Oh, there were
conflicts, and add the info on them" before doing it at the end is
all it takes.  Simple and straightforward---I like it.

> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -149,6 +149,12 @@ test_commit () {
>  		notick=yes
>  		shift
>  	fi &&
> +	signoff= &&
> +	if test "z$1" = "z--signoff"
> +	then
> +		signoff="$1"
> +		shift
> +	fi &&
>  	file=${2:-"$1.t"} &&
>  	echo "${3-$1}" > "$file" &&
>  	git add "$file" &&

This is somewhat iffy.  Shouldn't "test_commit --signoff --notick" work?

> @@ -156,7 +162,7 @@ test_commit () {
>  	then
>  		test_tick
>  	fi &&
> -	git commit -m "$1" &&
> +	git commit $signoff -m "$1" &&
>  	git tag "$1"
>  }

Thanks.

  reply	other threads:[~2012-09-13 17:04 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
2012-09-13  7:33     ` [PATCH v2] " Miklos Vajna
2012-09-13 17:04       ` Junio C Hamano [this message]
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=7vd31pam6t.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).