commit-tree: do not complete line in -F input
"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>
Ross Kabus committed
Sep 7, 2017 at 10:41 UTC
c818e743325e5710dbf2071b769fbcbc3b50a9e0
1 file changed
-1
builtin/commit-tree.c
-1
@@ -102,7 +102,6 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
102
if (fd && close(fd))
103
die_errno("git commit-tree: failed to close '%s'",
104
argv[i]);
105
- strbuf_complete_line(&buffer);
105
continue;
106
}
107