{"thread":{"id":"10868","subject":"[PATCH] builtin-commit: Clean up an unused variable and a debug fprintf().","startedAt":"2007-11-14T15:31:53Z","lastAt":"2007-11-14T15:31:53Z","messageCount":1,"participants":["Kristian Høgsberg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"59853","messageId":"1195054313-17607-1-git-send-email-krh@redhat.com","threadId":"10868","inReplyTo":null,"subject":"[PATCH] builtin-commit: Clean up an unused variable and a debug fprintf().","fromName":"Kristian Høgsberg","fromEmail":"krh@redhat.com","sentAt":"2007-11-14T15:31:53Z","receivedAt":"2007-11-14T15:31:53Z","isPatch":true,"sender":{"key":"krh@redhat.com","avatar":"https://gravatar.com/avatar/763dee6f9594ac474f725b137a39565792928e583ddf59b32befc2907409027e?d=mp&s=160"},"body":"Signed-off-by: Kristian Høgsberg <krh@redhat.com>\n---\n builtin-commit.c |    8 +++-----\n 1 files changed, 3 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 7a8cb57..7841310 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -514,7 +514,7 @@ static const char commit_utf8_warn[] =\n \n int cmd_commit(int argc, const char **argv, const char *prefix)\n {\n-\tint header_len, parent_count = 0;\n+\tint header_len;\n \tstruct strbuf sb;\n \tconst char *index_file, *reflog_msg;\n \tchar *nl;\n@@ -550,7 +550,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t/* Determine parents */\n \tif (initial_commit) {\n \t\treflog_msg = \"commit (initial)\";\n-\t\tparent_count = 0;\n \t} else if (amend) {\n \t\tstruct commit_list *c;\n \t\tstruct commit *commit;\n@@ -591,10 +590,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \n \t/* Get the commit message and validate it */\n \theader_len = sb.len;\n-\tif (!no_edit) {\n-\t\tfprintf(stderr, \"launching editor, log %s\\n\", logfile);\n+\tif (!no_edit)\n \t\tlaunch_editor(git_path(commit_editmsg), &sb);\n-\t} else if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0)\n+\telse if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0)\n \t\tdie(\"could not read commit message\\n\");\n \tif (run_hook(index_file, \"commit-msg\", commit_editmsg))\n \t\texit(1);\n-- \n1.5.3.5.1822.g11971-dirty\n"}]}