Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Beyer <s-beyer@gmx.net>2008-07-25 20:28:42 +0400
committerJunio C Hamano <gitster@pobox.com>2008-07-26 04:09:38 +0400
commit7198203ae37c11327c0d01f1e37f3e74381755a9 (patch)
tree85943c2eca8abf5458105626471f517a340cc5a2 /builtin-tag.c
parentd82f33e20dcf068e679eff2a16ecf8fe7b10fb31 (diff)
editor.c: Libify launch_editor()
This patch removes exit()/die() calls and builtin-specific messages from launch_editor(), so that it can be used as a general libgit.a function to launch an editor. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-tag.c')
-rw-r--r--builtin-tag.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-tag.c b/builtin-tag.c
index 219f51d6fc..325b1b2632 100644
--- a/builtin-tag.c
+++ b/builtin-tag.c
@@ -295,7 +295,11 @@ static void create_tag(const unsigned char *object, const char *tag,
write_or_die(fd, tag_template, strlen(tag_template));
close(fd);
- launch_editor(path, buf, NULL);
+ if (launch_editor(path, buf, NULL)) {
+ fprintf(stderr,
+ "Please supply the message using either -m or -F option.\n");
+ exit(1);
+ }
unlink(path);
free(path);