git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Avi Kivity <avi@cloudius-systems.com>, git@vger.kernel.org
Subject: Re: [PATCH v2] git-am: add option to extract email Message-Id: tag into commit log
Date: Wed, 02 Jul 2014 11:58:03 +0200	[thread overview]
Message-ID: <53B3D7AB.6090207@web.de> (raw)
In-Reply-To: <1404291113-4424-1-git-send-email-avi@cloudius-systems.com>

> --- a/git-am.sh
> +++ b/git-am.sh
> @@ -39,6 +39,7 @@ committer-date-is-author-date    lie about committer date
>  ignore-date     use current timestamp for author date
>  rerere-autoupdate update the index with reused conflict resolution if possible
>  S,gpg-sign?     GPG-sign commits
> +m,message-id    copy the Message-Id: header to the commit's tag stanza
>  rebasing*       (internal use for git-rebase)"
>  
>  . git-sh-setup
> @@ -371,7 +372,7 @@ split_patches () {
>  prec=4
>  dotest="$GIT_DIR/rebase-apply"
>  sign= utf8=t keep= keepcr= skip= interactive= resolved= rebasing= abort=
> -resolvemsg= resume= scissors= no_inbody_headers=
> +resolvemsg= resume= scissors= no_inbody_headers= message_id=
>  git_apply_opt=
>  committer_date_is_author_date=
>  ignore_date=
> @@ -442,6 +443,8 @@ it will be removed. Please do not use it anymore."
>  		gpg_sign_opt=-S ;;
>  	--gpg-sign=*)
>  		gpg_sign_opt="-S${1#--gpg-sign=}" ;;
> +	-m|--message-id)
> +		message_id=t ;;
>  	--)
>  		shift; break ;;
>  	*)
> @@ -565,6 +568,7 @@ Use \"git am --abort\" to remove it.")"
>  	echo " $git_apply_opt" >"$dotest/apply-opt"
>  	echo "$threeway" >"$dotest/threeway"
>  	echo "$sign" >"$dotest/sign"
> +	echo "$message_id" > "$dotest/message-id"
>  	echo "$utf8" >"$dotest/utf8"
>  	echo "$keep" >"$dotest/keep"
>  	echo "$scissors" >"$dotest/scissors"
> @@ -757,6 +761,10 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
>  		then
>  			cat "$dotest/msg-clean"
>  		fi
> +		if test 't' == "$message_id"

The == is bash special, please use = instead
And the 't' can be written as t, so that the whole line looks like this:
		if test t = "$message_id"

  reply	other threads:[~2014-07-02  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02  8:51 [PATCH v2] git-am: add option to extract email Message-Id: tag into commit log Avi Kivity
2014-07-02  9:58 ` Torsten Bögershausen [this message]
2014-07-02 13:54   ` Avi Kivity
2014-07-02 14:18 ` Fabian Ruch
2014-07-02 14:44   ` Avi Kivity
2014-07-02 17:17 ` Junio C Hamano
2014-07-03 14:08   ` Avi Kivity

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=53B3D7AB.6090207@web.de \
    --to=tboegi@web.de \
    --cc=avi@cloudius-systems.com \
    --cc=git@vger.kernel.org \
    /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).