public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Guido Günther" <agx@sigxcpu•org>
Cc: git@vger•kernel.org
Subject: Re: [PATCH v2 1/3] revert.c: Allow to specify -x via git-config
Date: Wed, 19 Feb 2014 11:57:37 -0800	[thread overview]
Message-ID: <xmqqy51698pa.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <85b9fa68b1a5542817489ddbe186cbb7600599b0.1392758057.git.agx@sigxcpu.org> ("Guido Günther"'s message of "Tue, 18 Feb 2014 22:27:40 +0100")

Guido Günther <agx@sigxcpu•org> writes:

> Without this when maintaining stable branches it's easy to forget to use
> -x to track where a patch was cherry-picked from.
> ---
>  Documentation/config.txt          |  4 ++++
>  Documentation/git-cherry-pick.txt |  8 ++++++++
>  builtin/revert.c                  | 14 +++++++++++++-
>  3 files changed, 25 insertions(+), 1 deletion(-)

Hmph.  Does this round address the issues raised in the previous
discussion in any way?

How does it affect people's existing scripts that use cherry-pick
and rely on it not doing the unwanted -x thing if such a
configuration variable is introduced as the first step in the
series, without even giving them to override the configured default
from the command line?

For that matter, I do not think a new override option from the
command line is a great solution, as that approach forces people's
existing script to be adjusted.

I personally found the way Jonathan explained why "git backport"
alias is the best solution (not just a usable workaround) very
compelling, especially his point (3):

 (3) The caller explicitly specifies their intent by running "git
     backport".  It doesn't affect unrelated uses of cherry-pick on
     other branches.

I do not even mind throwing something like this:

	#!/bin/sh
	# "git backport" - cherry-pick with -x always on.
        exec git cherry-pick -x "$@"

in contrib/ somewhere, which feels like a far more appropriate
solution to your "easy to forget" problem, at least to me.

  reply	other threads:[~2014-02-19 19:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18  6:56 [PATCH] revert.c: Allow to specify -x via git-config Guido Günther
2014-02-18  9:11 ` John Keeping
2014-02-18 17:49 ` Jonathan Nieder
2014-02-18 18:38   ` brian m. carlson
2014-02-18 19:20     ` Jonathan Nieder
2014-02-18 21:27       ` [PATCH v2 0/3] Allow to configure cherry-pick's record origin Guido Günther
2014-02-18 21:27         ` [PATCH v2 1/3] revert.c: Allow to specify -x via git-config Guido Günther
2014-02-19 19:57           ` Junio C Hamano [this message]
2014-02-18 21:27         ` [PATCH v2 2/3] revert.c: Add --record-origin Guido Günther
2014-02-18 21:27         ` [PATCH v2 3/3] revert.c Allow to override cherrypick.recordOrigin Guido Günther

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=xmqqy51698pa.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=agx@sigxcpu$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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