From: Junio C Hamano Date: Thu, 14 Sep 2017 08:40:39 +0000 (+0900) Subject: Merge branch 'rk/commit-tree-make-F-verbatim' into next X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3d40c900f344c5f6952b4d79a1e3c7ff4f1ff100?hp=-c Merge branch 'rk/commit-tree-make-F-verbatim' into next Unlike "git commit-tree < file", "git commit-tree -F file" did not pass the contents of the file verbatim and instead completed an incomplete line at the end, if exists. The latter has been updated to match the behaviour of the former. * rk/commit-tree-make-F-verbatim: commit-tree: do not complete line in -F input --- 3d40c900f344c5f6952b4d79a1e3c7ff4f1ff100 diff --combined builtin/commit-tree.c index 19e898fa4e,c1de41c67f..2177251e24 --- a/builtin/commit-tree.c +++ b/builtin/commit-tree.c @@@ -56,7 -56,7 +56,7 @@@ int cmd_commit_tree(int argc, const cha struct object_id oid; if (argc <= ++i) usage(commit_tree_usage); - if (get_sha1_commit(argv[i], oid.hash)) + if (get_oid_commit(argv[i], &oid)) die("Not a valid object name %s", argv[i]); assert_sha1_type(oid.hash, OBJ_COMMIT); new_parent(lookup_commit(&oid), &parents); @@@ -102,11 -102,10 +102,10 @@@ if (fd && close(fd)) die_errno("git commit-tree: failed to close '%s'", argv[i]); - strbuf_complete_line(&buffer); continue; } - if (get_sha1_tree(arg, tree_oid.hash)) + if (get_oid_tree(arg, &tree_oid)) die("Not a valid object name %s", arg); if (got_tree) die("Cannot give more than one trees");