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

Re: [PATCH 2/3] Add -n/--no-prompt option to mergetool

From
Andreas Ericsson <ae@op5.se>
Date
Oct 21, 2008, 11:49 UTC
Message-ID
<48FDC1CA.2080800@op5.se>
In-Reply-To
<1224583999-26279-2-git-send-email-charles@hashpling.org>
Charles Bailey wrote:
Show 48 quoted lines
> This option lets git mergetool invoke the conflict resolution program
> without waiting for a user response each time.
> 
> Also added a mergetool.prompt (default true) configuration variable
> controlling the same behaviour.
> 
> Signed-off-by: Charles Bailey <charles@hashpling.org>
> ---
>  Documentation/config.txt        |    3 +++
>  Documentation/git-mergetool.txt |   11 ++++++++++-
>  git-mergetool.sh                |   16 +++++++++++++---
>  3 files changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 29369d0..b4e4ee4 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -976,6 +976,9 @@ mergetool.keepBackup::
>  	is set to `false` then this file is not preserved.  Defaults to
>  	`true` (i.e. keep the backup files).
>  
> +mergetool.prompt::
> +	Prompt before each invocation of the merge resolution program.
> +
>  pack.window::
>  	The size of the window used by linkgit:git-pack-objects[1] when no
>  	window size is given on the command line. Defaults to 10.
> diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt
> index e0b2703..6d6bfe0 100644
> --- a/Documentation/git-mergetool.txt
> +++ b/Documentation/git-mergetool.txt
> @@ -7,7 +7,7 @@ git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
>  
>  SYNOPSIS
>  --------
> -'git mergetool' [--tool=<tool>] [<file>]...
> +'git mergetool' [--tool=<tool>] [-n|--no-prompt|--prompt] [<file>]...
>  
>  DESCRIPTION
>  -----------
> @@ -60,6 +60,15 @@ variable `mergetool.<tool>.trustExitCode` can be set to `true`.
>  Otherwise, 'git-mergetool' will prompt the user to indicate the
>  success of the resolution after the custom tool has exited.
>  
> +-n or --no-prompt::
> +	Don't prompt before each invocation of the merge resolution
> +	program.
> +

There is discussion already about "-n should be for dry-run!" and git's inconsistencies in such matters. Wouldn't -y ("assume yes on prompt") be better?

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Jeff KingNext: Charles Bailey
Message 5 of 13 in “Fix some tab/space inconsistencies in git-mergetool.sh”
  1. 1/3 Fix some tab/space inconsistencies in git-mergetool.shCharles Bailey, Oct 21, 2008
  2. 2/3 Add -n/--no-prompt option to mergetoolCharles Bailey, Oct 21, 2008
  3. 3/3 Add -k/--keep-going option to mergetoolCharles Bailey, Oct 21, 2008
  4. Jeff KingOct 21, 2008
  5. Andreas EricssonOct 21, 2008
  6. Charles BaileyOct 21, 2008
  7. Charles BaileyOct 22, 2008
  8. Junio C HamanoOct 22, 2008
  9. Charles BaileyOct 23, 2008
  10. William PursellOct 24, 2008
  11. Charles BaileyOct 24, 2008
  12. William PursellOct 25, 2008
  13. Charles BaileyNov 13, 2008

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.