From: Ross Kabus Date: Thu, 7 Sep 2017 14:41:11 +0000 (-0400) Subject: commit-tree: do not complete line in -F input X-Git-Tag: v2.15.0-rc0~77^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c818e743325e5710dbf2071b769fbcbc3b50a9e0;p=thirdparty%2Fgit.git commit-tree: do not complete line in -F input "git commit-tree -F ", unlike "cat | git commit-tree" (i.e. feeding the same contents from the standard input), added a missing final newline when the input ended in an incomplete line. Correct this inconsistency by leaving the incomplete line as-is, as erring on the side of not touching the input is preferrable and expected for a plumbing command like "commit-tree". Signed-off-by: Ross Kabus Signed-off-by: Junio C Hamano --- diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c index a4a923d7c0..c1de41c67f 100644 --- a/builtin/commit-tree.c +++ b/builtin/commit-tree.c @@ -102,7 +102,6 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix) if (fd && close(fd)) die_errno("git commit-tree: failed to close '%s'", argv[i]); - strbuf_complete_line(&buffer); continue; }