From: Junio C Hamano <gitster@pobox.com>
To: Cameron Currie <me@cameroncurrie.net>,
Daurnimator <quae@daurnimator.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] git-stash: Don't GPG sign when stashing changes
Date: Mon, 02 May 2016 14:57:38 -0700 [thread overview]
Message-ID: <xmqqoa8oqg19.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <01020154733c27e9-deaa7a20-1de6-416a-a7d4-3229854117eb-000000@eu-west-1.amazonses.com> (Cameron Currie's message of "Mon, 2 May 2016 20:50:02 +0000")
Cameron Currie <me@cameroncurrie.net> writes:
> This is helpful for folks with commit.gpgsign = true in their .gitconfig.
>
> Signed-off-by: Cameron Currie <me@cameroncurrie.net>
> ---
I do not think this is particularly a good change.
There are a few other in-tree users of "git commit-tree",
e.g. quiltimport and filter-branch, and their users would be hurt
the same way if they set commit.gpgsign in the configuration.
I think it was a mistake that "commit-tree" was made to pay
attention to the configuration variable in the first place.
Allowing scripts that use commit-tree to explicitly pass -S to it is
perfectly fine (and these calling scripts are welcome to honor
commit.gpgsign by reading the configration themselves if their users
want it that way).
I'll send a pair of proposed alternative solutions shortly.
> git-stash.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/git-stash.sh b/git-stash.sh
> index c7c65e2..fcf01b9 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -85,7 +85,7 @@ create_stash () {
> # state of the index
> i_tree=$(git write-tree) &&
> i_commit=$(printf 'index on %s\n' "$msg" |
> - git commit-tree $i_tree -p $b_commit) ||
> + git commit-tree --no-gpg-sign $i_tree -p $b_commit) ||
> die "$(gettext "Cannot save the current index state")"
>
> if test -n "$untracked"
> @@ -99,7 +99,7 @@ create_stash () {
> rm -f "$TMPindex" &&
> git update-index -z --add --remove --stdin &&
> u_tree=$(git write-tree) &&
> - printf 'untracked files on %s\n' "$msg" | git commit-tree $u_tree &&
> + printf 'untracked files on %s\n' "$msg" | git commit-tree --no-gpg-sign $u_tree &&
> rm -f "$TMPindex"
> ) ) || die "Cannot save the untracked files"
>
> @@ -153,7 +153,7 @@ create_stash () {
> stash_msg=$(printf 'On %s: %s' "$branch" "$stash_msg")
> fi
> w_commit=$(printf '%s\n' "$stash_msg" |
> - git commit-tree $w_tree -p $b_commit -p $i_commit $untracked_commit_option) ||
> + git commit-tree --no-gpg-sign $w_tree -p $b_commit -p $i_commit $untracked_commit_option) ||
> die "$(gettext "Cannot record working tree state")"
> }
>
>
> --
> https://github.com/git/git/pull/186
next prev parent reply other threads:[~2016-05-02 21:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 17:32 [PATCH] git-stash: Don't GPG sign when stashing changes Cameron Currie
2015-11-06 18:56 ` Junio C Hamano
2016-04-07 2:24 ` daurnimator
2016-04-07 8:19 ` Johannes Schindelin
2016-04-12 2:46 ` Daurnimator
[not found] ` <CAOAY-+1TztY95z3Yi34HB3aYUG5aOHKK9G3OmpYM41ugDMtJUA@mail.gmail.com>
2016-04-14 15:50 ` Johannes Schindelin
2016-05-02 6:06 ` Daurnimator
2016-05-02 20:50 ` [PATCH v2] " Cameron Currie
2016-05-02 21:57 ` Junio C Hamano [this message]
2016-05-02 23:56 ` Daurnimator
2016-05-03 1:21 ` Junio C Hamano
2016-05-06 6:06 ` Daurnimator
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=xmqqoa8oqg19.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=me@cameroncurrie.net \
--cc=quae@daurnimator.com \
/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).