Merge branch 'js/replace-edit-use-editor-configuration'
authorJunio C Hamano <gitster@pobox.com>
Fri, 29 Apr 2016 19:59:07 +0000 (12:59 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Apr 2016 19:59:07 +0000 (12:59 -0700)
"git replace -e" did not honour "core.editor" configuration.

* js/replace-edit-use-editor-configuration:
replace --edit: respect core.editor

1  2 
builtin/replace.c
diff --combined builtin/replace.c
index 748c6ca954679e3fc47c25991dd50e539eaa543d,15bec80b7ddc04eff032ecb73c2191436f131835..b58c714cb8935efd08c81c8ebfd8922e1704c8f4
@@@ -358,10 -358,10 +358,10 @@@ static void check_one_mergetag(struct c
  
        /* iterate over new parents */
        for (i = 1; i < mergetag_data->argc; i++) {
 -              unsigned char sha1[20];
 -              if (get_sha1(mergetag_data->argv[i], sha1) < 0)
 +              struct object_id oid;
 +              if (get_sha1(mergetag_data->argv[i], oid.hash) < 0)
                        die(_("Not a valid object name: '%s'"), mergetag_data->argv[i]);
 -              if (!hashcmp(tag->tagged->sha1, sha1))
 +              if (!oidcmp(&tag->tagged->oid, &oid))
                        return; /* found */
        }
  
@@@ -440,6 -440,7 +440,7 @@@ int cmd_replace(int argc, const char **
        };
  
        check_replace_refs = 0;
+       git_config(git_default_config, NULL);
  
        argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0);