merge(3p/git): Merge git subtree at v2.29.2
This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb
This commit is contained in:
parent
082c006c04
commit
f4609b896f
1485 changed files with 241535 additions and 109418 deletions
13
third_party/git/editor.c
vendored
13
third_party/git/editor.c
vendored
|
@ -40,7 +40,7 @@ const char *git_sequence_editor(void)
|
|||
const char *editor = getenv("GIT_SEQUENCE_EDITOR");
|
||||
|
||||
if (!editor)
|
||||
git_config_get_string_const("sequence.editor", &editor);
|
||||
git_config_get_string_tmp("sequence.editor", &editor);
|
||||
if (!editor)
|
||||
editor = git_editor();
|
||||
|
||||
|
@ -54,7 +54,8 @@ static int launch_specified_editor(const char *editor, const char *path,
|
|||
return error("Terminal is dumb, but EDITOR unset");
|
||||
|
||||
if (strcmp(editor, ":")) {
|
||||
const char *args[] = { editor, real_path(path), NULL };
|
||||
struct strbuf realpath = STRBUF_INIT;
|
||||
const char *args[] = { editor, NULL, NULL };
|
||||
struct child_process p = CHILD_PROCESS_INIT;
|
||||
int ret, sig;
|
||||
int print_waiting_for_editor = advice_waiting_for_editor && isatty(2);
|
||||
|
@ -75,16 +76,22 @@ static int launch_specified_editor(const char *editor, const char *path,
|
|||
fflush(stderr);
|
||||
}
|
||||
|
||||
strbuf_realpath(&realpath, path, 1);
|
||||
args[1] = realpath.buf;
|
||||
|
||||
p.argv = args;
|
||||
p.env = env;
|
||||
p.use_shell = 1;
|
||||
p.trace2_child_class = "editor";
|
||||
if (start_command(&p) < 0)
|
||||
if (start_command(&p) < 0) {
|
||||
strbuf_release(&realpath);
|
||||
return error("unable to start editor '%s'", editor);
|
||||
}
|
||||
|
||||
sigchain_push(SIGINT, SIG_IGN);
|
||||
sigchain_push(SIGQUIT, SIG_IGN);
|
||||
ret = finish_command(&p);
|
||||
strbuf_release(&realpath);
|
||||
sig = ret - 128;
|
||||
sigchain_pop(SIGINT);
|
||||
sigchain_pop(SIGQUIT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue