diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-03-08 00:59:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-08 00:59:41 +0100 |
commit | ae46d5fb98b316767f51a82fc0c1441174995a34 (patch) | |
tree | cc3dfac4a54bcdb534eb86be1f50a9791ea1a7c9 /merge.c | |
parent | Merge branch 'cc/rev-list-allow-missing-tips' (diff) | |
parent | fill_tree_descriptor(): mark error message for translation (diff) | |
download | git-ae46d5fb98b316767f51a82fc0c1441174995a34.tar.xz git-ae46d5fb98b316767f51a82fc0c1441174995a34.zip |
Merge branch 'js/merge-tree-3-trees'
"git merge-tree" has learned that the three trees involved in the
3-way merge only need to be trees, not necessarily commits.
* js/merge-tree-3-trees:
fill_tree_descriptor(): mark error message for translation
cache-tree: avoid an unnecessary check
Always check `parse_tree*()`'s return value
t4301: verify that merge-tree fails on missing blob objects
merge-ort: do check `parse_tree()`'s return value
merge-tree: fail with a non-zero exit code on missing tree objects
merge-tree: accept 3 trees as arguments
Diffstat (limited to 'merge.c')
-rw-r--r-- | merge.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -77,7 +77,10 @@ int checkout_fast_forward(struct repository *r, return -1; } for (i = 0; i < nr_trees; i++) { - parse_tree(trees[i]); + if (parse_tree(trees[i]) < 0) { + rollback_lock_file(&lock_file); + return -1; + } init_tree_desc(t+i, trees[i]->buffer, trees[i]->size); } |