[PATCH v2] commit-tree: do not complete line in -F input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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 preferable
and expected for a plumbing command like "commit-tree".

Signed-off-by: Ross Kabus <rkabus@xxxxxxxxxxxx>
---
Fixed up commit message with feedback from Junio.

 builtin/commit-tree.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index 19e898fa4..2177251e2 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;
 		}
 
-- 
2.13.1.windows.2




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux