diff options
-rw-r--r-- | builtin/merge-tree.c | 3 | ||||
-rwxr-xr-x | t/t4300-merge-tree.sh | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index fc00d794d6..9b25ddc979 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -60,6 +60,7 @@ static void *result(struct merge_list *entry, unsigned long *size) { enum object_type type; struct blob *base, *our, *their; + const char *path = entry->path; if (!entry->stage) return read_sha1_file(entry->blob->object.sha1, &type, size); @@ -76,7 +77,7 @@ static void *result(struct merge_list *entry, unsigned long *size) their = NULL; if (entry) their = entry->blob; - return merge_file(entry->path, base, our, their, size); + return merge_file(path, base, our, their, size); } static void *origin(struct merge_list *entry, unsigned long *size) diff --git a/t/t4300-merge-tree.sh b/t/t4300-merge-tree.sh index 1eba862369..46c3fe76d3 100755 --- a/t/t4300-merge-tree.sh +++ b/t/t4300-merge-tree.sh @@ -24,7 +24,7 @@ EXPECTED test_cmp expected actual ' -test_expect_failure 'file add !A, B' ' +test_expect_success 'file add !A, B' ' cat >expected <<\EXPECTED && added in local our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE @@ -195,7 +195,7 @@ EXPECTED test_cmp expected actual ' -test_expect_failure 'file remove !A, B' ' +test_expect_success 'file remove !A, B' ' cat >expected <<\EXPECTED && removed in remote base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE @@ -213,7 +213,7 @@ EXPECTED test_cmp expected actual ' -test_expect_failure 'file change A, remove B' ' +test_expect_success 'file change A, remove B' ' cat >expected <<\EXPECTED && removed in remote base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE |