summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-11-14 15:31:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-23 01:05:04 (GMT)
commit18abc2dba4973c3c2cff286fac3340e95e0ee474 (patch)
treee14b5891ff851271ecb67ae645863f23d3cba574 /builtin-commit.c
parentef12b50d0cf0123377a6fb96584a287a6c24346b (diff)
downloadgit-18abc2dba4973c3c2cff286fac3340e95e0ee474.zip
git-18abc2dba4973c3c2cff286fac3340e95e0ee474.tar.gz
git-18abc2dba4973c3c2cff286fac3340e95e0ee474.tar.bz2
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index ee9fe72..5e2257c 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -515,7 +515,7 @@ static const char commit_utf8_warn[] =
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;
@@ -551,7 +551,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
/* Determine parents */
if (initial_commit) {
reflog_msg = "commit (initial)";
- parent_count = 0;
} else if (amend) {
struct commit_list *c;
struct commit *commit;
@@ -592,10 +591,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
/* 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);