@matheusbsbs / matheus-bagliano / commits / 18abc2dba4
Fork 0

builtin-commit: Clean up an unused variable and a debug fprintf().

Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Kristian Høgsberg committed Nov 14, 2007 at 10:31 UTC 18abc2dba4973c3c2cff286fac3340e95e0ee474
1 file changed +3 -5
builtin-commit.c
+3 -5
@@ -515,7 +515,7 @@ static const char commit_utf8_warn[] =
515
516 int cmd_commit(int argc, const char **argv, const char *prefix)
517 {
518 - int header_len, parent_count = 0;
518 + int header_len;
519 struct strbuf sb;
520 const char *index_file, *reflog_msg;
521 char *nl;
@@ -551,7 +551,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
551 /* Determine parents */
552 if (initial_commit) {
553 reflog_msg = "commit (initial)";
554 - parent_count = 0;
554 } else if (amend) {
555 struct commit_list *c;
556 struct commit *commit;
@@ -592,10 +591,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
591
592 /* Get the commit message and validate it */
593 header_len = sb.len;
595 - if (!no_edit) {
596 - fprintf(stderr, "launching editor, log %s\n", logfile);
594 + if (!no_edit)
595 launch_editor(git_path(commit_editmsg), &sb);
598 - } else if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0)
596 + else if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0)
597 die("could not read commit message\n");
598 if (run_hook(index_file, "commit-msg", commit_editmsg))
599 exit(1);