git checkout A^0 &&
- test-tool chmtime =31337 b &&
- test-tool chmtime -v +0 b >expected-mtime &&
+ test-tool chmtime --get -3600 b >old-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
- test_i18ngrep "Skipped b" out &&
test_must_be_empty err &&
- test-tool chmtime -v +0 b >actual-mtime &&
- test_cmp expected-mtime actual-mtime &&
+ # Make sure b was NOT updated
+ test-tool chmtime --get b >new-mtime &&
+ test_cmp old-mtime new-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git checkout B^0 &&
+ test-tool chmtime --get -3600 b >old-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
- test_i18ngrep "Auto-merging b" out &&
+ # Make sure b WAS updated
+ test-tool chmtime --get b >new-mtime &&
+ test $(cat old-mtime) -lt $(cat new-mtime) &&
+
test_must_be_empty err &&
git ls-files -s >index_files &&
git checkout A^0 &&
+ test_path_is_missing c &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
- test_i18ngrep ! "Skipped c" out &&
- test_must_be_empty err &&
+ test_path_is_file c &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git checkout B^0 &&
+ test-tool chmtime --get -3600 c >old-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
- test_i18ngrep ! "Skipped c" out &&
+ # Make sure c WAS updated
+ test-tool chmtime --get c >new-mtime &&
+ test $(cat old-mtime) -lt $(cat new-mtime) &&
+
test_must_be_empty err &&
git ls-files -s >index_files &&
git checkout A^0 &&
- test-tool chmtime =31337 c &&
- test-tool chmtime -v +0 c >expected-mtime &&
-
+ test-tool chmtime --get -3600 c >old-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
- test_i18ngrep "Skipped c" out &&
test_must_be_empty err &&
- test-tool chmtime -v +0 c >actual-mtime &&
- test_cmp expected-mtime actual-mtime &&
+ # Make sure c WAS updated
+ test-tool chmtime --get c >new-mtime &&
+ test_cmp old-mtime new-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git checkout B^0 &&
+ test_path_is_missing c &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
- test_i18ngrep "Auto-merging c" out &&
+ # Make sure c now present (and thus was updated)
+ test_path_is_file c &&
+
test_must_be_empty err &&
git ls-files -s >index_files &&
git checkout A^0 &&
+ test-tool chmtime --get -3600 c >old-mtime &&
GIT_MERGE_VERBOSITY=3 &&
export GIT_MERGE_VERBOSITY &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/add): Rename b->c" out &&
- test_i18ngrep ! "Skipped c" out &&
- test_must_be_empty err
+ test_must_be_empty err &&
+
+ # Make sure c WAS updated
+ test-tool chmtime --get c >new-mtime &&
+ test $(cat old-mtime) -lt $(cat new-mtime)
# FIXME: rename/add conflicts are horribly broken right now;
# when I get back to my patch series fixing it and
git checkout A^0 &&
+ test_path_is_missing bar/bq &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
- test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
+ test_path_is_file bar/bq &&
+
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git checkout B^0 &&
+ test_path_is_missing bar/bq &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive A^0 >out 2>err &&
- test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
+ test_path_is_file bar/bq &&
+
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git checkout A^0 &&
+ test_path_is_missing bar/bq &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
- test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
+ test_path_is_file bar/bq &&
+
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git checkout B^0 &&
+ test_path_is_missing bar/bq &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive A^0 >out 2>err &&
- test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
+ test_path_is_file bar/bq &&
+
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git checkout A^0 &&
echo "File rewritten" >b &&
- test-tool chmtime =31337 b &&
- test-tool chmtime -v +0 b >expected-mtime &&
+ test-tool chmtime --get -3600 b >old-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
- test_i18ngrep "Skipped b" out &&
test_must_be_empty err &&
- test-tool chmtime -v +0 b >actual-mtime &&
- test_cmp expected-mtime actual-mtime &&
+ # Make sure b was NOT updated
+ test-tool chmtime --get b >new-mtime &&
+ test_cmp old-mtime new-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git checkout A^0 &&
echo "File rewritten" >c &&
- test-tool chmtime =31337 c &&
- test-tool chmtime -v +0 c >expected-mtime &&
+ test-tool chmtime --get -3600 c >old-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
- test_i18ngrep "Skipped c" out &&
test_must_be_empty err &&
- test-tool chmtime -v +0 c >actual-mtime &&
- test_cmp expected-mtime actual-mtime &&
+ # Make sure c was NOT updated
+ test-tool chmtime --get c >new-mtime &&
+ test_cmp old-mtime new-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&