summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef12b50)
raw | patch | inline | side by side (parent: ef12b50)
author | Kristian Høgsberg <krh@redhat.com> | |
Wed, 14 Nov 2007 15:31:53 +0000 (10:31 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Nov 2007 01:05:04 +0000 (17:05 -0800) |
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c | patch | blob | history |
diff --git a/builtin-commit.c b/builtin-commit.c
index ee9fe72c61e474d736fd942f6100c370fef6c733..5e2257c96101ff3d596aa898921ee96cb6d896cb 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
int cmd_commit(int argc, const char **argv, const char *prefix)
{
- int header_len, parent_count = 0;
+ int header_len;
struct strbuf sb;
const char *index_file, *reflog_msg;
char *nl;
/* Determine parents */
if (initial_commit) {
reflog_msg = "commit (initial)";
- parent_count = 0;
} else if (amend) {
struct commit_list *c;
struct commit *commit;
/* Get the commit message and validate it */
header_len = sb.len;
- if (!no_edit) {
- fprintf(stderr, "launching editor, log %s\n", logfile);
+ if (!no_edit)
launch_editor(git_path(commit_editmsg), &sb);
- } else if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0)
+ else if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0)
die("could not read commit message\n");
if (run_hook(index_file, "commit-msg", commit_editmsg))
exit(1);