summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0eea345)
raw | patch | inline | side by side (parent: 0eea345)
author | Charles Bailey <charles@hashpling.org> | |
Thu, 13 Nov 2008 12:41:14 +0000 (12:41 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 15 Nov 2008 05:30:55 +0000 (21:30 -0800) |
This option lets git mergetool invoke the conflict resolution program
without waiting for a user prompt each time.
Also added a mergetool.prompt (default true) configuration variable
controlling the same behaviour
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
without waiting for a user prompt each time.
Also added a mergetool.prompt (default true) configuration variable
controlling the same behaviour
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | patch | blob | history | |
Documentation/git-mergetool.txt | patch | blob | history | |
git-mergetool.sh | patch | blob | history |
index 32dcd643d2e9ea82a7b65e295e9aa55f7dd999c2..bc5642d603238ad07c40315ecef228b8fed38d98 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
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.
index e0b2703b380cb46b23870a97b861462d8e8f758a..176483a1ae19fb39550d1c24edf444943c12c12e 100644 (file)
SYNOPSIS
--------
-'git mergetool' [--tool=<tool>] [<file>]...
+'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>]...
DESCRIPTION
-----------
Otherwise, 'git-mergetool' will prompt the user to indicate the
success of the resolution after the custom tool has exited.
+-y or --no-prompt::
+ Don't prompt before each invocation of the merge resolution
+ program.
+
+--prompt::
+ Prompt before each invocation of the merge resolution program.
+ This is the default behaviour; the option is provided to
+ override any configuration settings.
+
Author
------
Written by Theodore Y Ts'o <tytso@mit.edu>
diff --git a/git-mergetool.sh b/git-mergetool.sh
index e2da5fc5462328f3f5f776e1ae61223830b87ba3..507028f8597ef7a288ab7dd5c4d5a5163585380a 100755 (executable)
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
# at the discretion of Junio C Hamano.
#
-USAGE='[--tool=tool] [file to merge] ...'
+USAGE='[--tool=tool] [-y|--no-prompt|--prompt] [file to merge] ...'
SUBDIRECTORY_OK=Yes
OPTIONS_SPEC=
. git-sh-setup
echo "Normal merge conflict for '$MERGED':"
describe_file "$local_mode" "local" "$LOCAL"
describe_file "$remote_mode" "remote" "$REMOTE"
- printf "Hit return to start merge resolution tool (%s): " "$merge_tool"
- read ans
+ if "$prompt" = true; then
+ printf "Hit return to start merge resolution tool (%s): " "$merge_tool"
+ read ans
+ fi
case "$merge_tool" in
kdiff3)
cleanup_temp_files
}
+prompt=$(git config --bool mergetool.prompt || echo true)
+
while test $# != 0
do
case "$1" in
shift ;;
esac
;;
+ -y|--no-prompt)
+ prompt=false
+ ;;
+ --prompt)
+ prompt=true
+ ;;
--)
break
;;