@@ -378,42 +378,30 @@ test_expect_success '2c: Modify b & add c VS rename b->c' '
378
378
test_i18ngrep "CONFLICT (.*/add):" out &&
379
379
test_must_be_empty err &&
380
380
381
- # Make sure c WAS updated
381
+ git ls-files -s >index_files &&
382
+ test_line_count = 2 index_files &&
383
+
384
+ # Ensure b was removed
385
+ test_path_is_missing b &&
386
+
387
+ # Make sure c WAS updated...
382
388
test-tool chmtime --get c >new-mtime &&
383
- test $(cat old-mtime) -lt $(cat new-mtime)
384
-
385
- # FIXME: rename/add conflicts are horribly broken right now;
386
- # when I get back to my patch series fixing it and
387
- # rename/rename(2to1) conflicts to bring them in line with
388
- # how add/add conflicts behave, then checks like the below
389
- # could be added. But that patch series is waiting until
390
- # the rename-directory-detection series lands, which this
391
- # is part of. And in the mean time, I do not want to further
392
- # enforce broken behavior. So for now, the main test is the
393
- # one above that err is an empty file.
394
-
395
- #git ls-files -s >index_files &&
396
- #test_line_count = 2 index_files &&
397
-
398
- #git rev-parse >actual :2:c :3:c &&
399
- #git rev-parse >expect A:b A:c &&
400
- #test_cmp expect actual &&
401
-
402
- #git cat-file -p A:b >>merged &&
403
- #git cat-file -p A:c >>merge-me &&
404
- #>empty &&
405
- #test_must_fail git merge-file \
406
- # -L "Temporary merge branch 1" \
407
- # -L "" \
408
- # -L "Temporary merge branch 2" \
409
- # merged empty merge-me &&
410
- #sed -e "s/^\([<=>]\)/\1\1\1/" merged >merged-internal &&
411
-
412
- #git hash-object c >actual &&
413
- #git hash-object merged-internal >expect &&
414
- #test_cmp expect actual &&
415
-
416
- #test_path_is_missing b
389
+ test $(cat old-mtime) -lt $(cat new-mtime) &&
390
+
391
+ # ...and has correct index entries and working tree contents
392
+ git rev-parse >actual :2:c :3:c &&
393
+ git rev-parse >expect A:c A:b &&
394
+ test_cmp expect actual &&
395
+
396
+ git cat-file -p A:b >>merge-me &&
397
+ git cat-file -p A:c >>merged &&
398
+ >empty &&
399
+ test_must_fail git merge-file \
400
+ -L "HEAD" \
401
+ -L "" \
402
+ -L "B^0" \
403
+ merged empty merge-me &&
404
+ test_cmp merged c
417
405
)
418
406
'
419
407
0 commit comments