From ce8dcf4541c1cc84fd05163a3f4a803347bb1d63 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Tue, 17 Sep 2013 07:33:43 -0500 Subject: [PATCH] config: add core.mode = progress pseudo-config Signed-off-by: Felipe Contreras --- cache.h | 3 ++- config.c | 2 ++ git-mergetool.sh | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 68fd9fcdca..afb9177234 100644 --- a/cache.h +++ b/cache.h @@ -725,7 +725,8 @@ enum push_default_type { enum git_mode { MODE_CURRENT = 0, - MODE_NEXT + MODE_NEXT, + MODE_PROGRESS }; extern enum branch_track git_branch_track; diff --git a/config.c b/config.c index 3da2a59bbc..ea061fae90 100644 --- a/config.c +++ b/config.c @@ -919,6 +919,8 @@ static int git_default_core_config(const char *var, const char *value) git_mode = MODE_CURRENT; else if (!strcmp(value, "next")) { git_mode = MODE_NEXT; + } else if (!strcmp(value, "progress")) { + git_mode = MODE_PROGRESS; } else die("wrong mode '%s'", value); return 0; diff --git a/git-mergetool.sh b/git-mergetool.sh index 9f77e3a8bb..2bb53983ff 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -349,6 +349,10 @@ merge_file () { } prompt=$(git config --bool mergetool.prompt) +if test "$(git config core.mode)" != "progress" && test -z "$prompt" +then + prompt=true +fi guessed_merge_tool=false while test $# != 0 -- 2.32.0.93.g670b81a890