]> git.ipfire.org Git - thirdparty/git.git/commitdiff
commit-tree: do not complete line in -F input
authorRoss Kabus <rkabus@aerotech.com>
Thu, 7 Sep 2017 14:41:11 +0000 (10:41 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 10 Sep 2017 07:29:53 +0000 (16:29 +0900)
"git commit-tree -F <file>", unlike "cat <file> | 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 <rkabus@aerotech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit-tree.c

index a4a923d7c0b688e162c8e4d0411ff9b72748fb5c..c1de41c67f8c245ab53b3c3c86a9ad981f433917 100644 (file)
@@ -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;
                }