diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
commit | 037de004c68d704abf839eebe075c58c9603f8f3 (patch) | |
tree | 7ac13a7fbb70193e7d04fc193f75de839e914d45 /merge.c | |
parent | Adding upstream version 1:2.43.0. (diff) | |
download | git-037de004c68d704abf839eebe075c58c9603f8f3.tar.xz git-037de004c68d704abf839eebe075c58c9603f8f3.zip |
Adding upstream version 1:2.45.1.upstream/1%2.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'merge.c')
-rw-r--r-- | merge.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,6 +1,4 @@ #include "git-compat-util.h" -#include "diff.h" -#include "diffcore.h" #include "gettext.h" #include "hash.h" #include "hex.h" @@ -13,7 +11,6 @@ #include "tree.h" #include "tree-walk.h" #include "unpack-trees.h" -#include "dir.h" static const char *merge_argument(struct commit *commit) { @@ -80,8 +77,12 @@ int checkout_fast_forward(struct repository *r, return -1; } for (i = 0; i < nr_trees; i++) { - parse_tree(trees[i]); - init_tree_desc(t+i, trees[i]->buffer, trees[i]->size); + if (parse_tree(trees[i]) < 0) { + rollback_lock_file(&lock_file); + return -1; + } + init_tree_desc(t+i, &trees[i]->object.oid, + trees[i]->buffer, trees[i]->size); } memset(&opts, 0, sizeof(opts)); |