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:
authorJunio C Hamano <gitster@pobox.com>2007-12-09 10:23:20 +0300
committerJunio C Hamano <gitster@pobox.com>2007-12-09 11:55:55 +0300
commit740001a5780a12972c83c99f25c49c8d8cebdb43 (patch)
tree228d6f0b9401aeea2e83bbcaf320edda42029e8f /builtin-tag.c
parentaa6da6cddb65c3889751d0b06a7e3d339e303b1b (diff)
Fix commit-msg hook to allow editing
The old git-commit.sh script allowed the commit-msg hook to not only prevent a commit from proceding, but also to edit the commit message on the fly and allow it to proceed. So here we teach builtin-commit to do the same. This is based on Wincent's patch, but redone with a clarified logic. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-tag.c')
-rw-r--r--builtin-tag.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-tag.c b/builtin-tag.c
index 729389bbd6..9f966fc883 100644
--- a/builtin-tag.c
+++ b/builtin-tag.c
@@ -53,6 +53,8 @@ void launch_editor(const char *path, struct strbuf *buffer, const char *const *e
die("There was a problem with the editor %s.", editor);
}
+ if (!buffer)
+ return;
if (strbuf_read_file(buffer, path, 0) < 0)
die("could not read message file '%s': %s",
path, strerror(errno));