git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/3] revert.c: Allow to specify -x via git-config

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 19, 2014, 19:57 UTC
Message-ID
<xmqqy51698pa.fsf@gitster.dls.corp.google.com>
In-Reply-To
<85b9fa68b1a5542817489ddbe186cbb7600599b0.1392758057.git.agx@sigxcpu.org>
Guido Günther <agx@sigxcpu.org> writes:
Show 7 quoted lines
> 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.

Previous: Guido GüntherNext: Guido Günther
Message 8 of 10 in “revert.c: Allow to specify -x via git-config”
  1. revert.c: Allow to specify -x via git-configGuido Günther, Feb 18, 2014
  2. John KeepingFeb 18, 2014
  3. Jonathan NiederFeb 18, 2014
  4. brian m. carlsonFeb 18, 2014
  5. Jonathan NiederFeb 18, 2014
  6. 0/3 Allow to configure cherry-pick's record originGuido Günther, Feb 18, 2014
  7. 1/3 revert.c: Allow to specify -x via git-configGuido Günther, Feb 18, 2014
  8. Junio C HamanoFeb 19, 2014
  9. 2/3 revert.c: Add --record-originGuido Günther, Feb 18, 2014
  10. 3/3 revert.c Allow to override cherrypick.recordOriginGuido Günther, Feb 18, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.