summaryrefslogtreecommitdiff
path: root/builtin/merge-file.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-08-06 03:27:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-16 03:00:03 (GMT)
commit3668d4238314dc5db98de3034058f68ff57a6b1e (patch)
treea7d5c5494e53eeeb7a2c8fc4a93dbd181cbcef59 /builtin/merge-file.c
parent2bc8c1a8a6b1cdffc19badc7272f552302b79d3e (diff)
downloadgit-3668d4238314dc5db98de3034058f68ff57a6b1e.zip
git-3668d4238314dc5db98de3034058f68ff57a6b1e.tar.gz
git-3668d4238314dc5db98de3034058f68ff57a6b1e.tar.bz2
merge-file: run setup_git_directory_gently() sooner
Part of a campaign to make repository-local configuration available early (simplifying the startup sequence for built-in commands). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-file.c')
-rw-r--r--builtin/merge-file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index b8e9e5b..b6664d4 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -28,7 +28,6 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
xmparam_t xmp = {{0}};
int ret = 0, i = 0, to_stdout = 0;
int quiet = 0;
- int nongit;
struct option options[] = {
OPT_BOOLEAN('p', "stdout", &to_stdout, "send results to standard output"),
OPT_SET_INT(0, "diff3", &xmp.style, "use a diff3 based merge", XDL_MERGE_DIFF3),
@@ -50,8 +49,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
xmp.style = 0;
xmp.favor = 0;
- prefix = setup_git_directory_gently(&nongit);
- if (!nongit) {
+ if (startup_info->have_repository) {
/* Read the configuration file */
git_config(git_xmerge_config, NULL);
if (0 <= git_xmerge_style)