summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-22 12:41:55 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-22 12:41:55 -0700
commit29b2041c2a91d2f80afa9d4e0f6eeb77a3ff5bc6 (patch)
treee0ba066f9c04441aef5d34c41e24751415233da7 /builtin
parent935d93764466c52cae7218c13bde93043bd609bd (diff)
parentcb64800d83ace6fecb8701151cfdb6ed0712702c (diff)
downloadgit-29b2041c2a91d2f80afa9d4e0f6eeb77a3ff5bc6.tar.gz
Merge branch 'jk/add-e-kill-editor'
"git add -e" did not allow the user to abort the operation by killing the editor. * jk/add-e-kill-editor: add: check return value of launch_editor
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c
index ee370b059a..df5135bf62 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -209,7 +209,8 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
if (run_diff_files(&rev, 0))
die(_("Could not write patch"));
- launch_editor(file, NULL, NULL);
+ if (launch_editor(file, NULL, NULL))
+ die(_("editing patch failed"));
if (stat(file, &st))
die_errno(_("Could not stat '%s'"), file);