tests: prepare for a world without whatchanged
Some tests on fast-import run "git whatchanged" without even checking the output from the command. It is tempting to remove the calls altogether since they are not doing anything useful, but they presumably were added there while the tests were developed to manually sanity check which paths were touched. Replace these calls with "git log --raw", which is a rough equivalent in the more modern Git. This does not remove "git whatchanged", but we no longer have to worry about adjusting these places when we eventually do. Helped-by: Elijah Newren <newren@gmail.com> [en: log message] Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
May 12, 2025 at 12:03 UTC
ab4d1880e19c2229055334f0fe309b89e91f27a9
2 files changed
+7
-7
t/t9300-fast-import.sh
+6
-6
@@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '
120
121
INPUT_END
122
git fast-import --export-marks=marks.out <input &&
123
- git whatchanged main
123
+ git log --raw main
124
'
125
126
test_expect_success 'A: verify pack' '
@@ -279,7 +279,7 @@ test_expect_success 'A: verify marks import does not crash' '
279
INPUT_END
280
281
git fast-import --import-marks=marks.out <input &&
282
- git whatchanged verify--import-marks
282
+ git log --raw verify--import-marks
283
'
284
285
test_expect_success 'A: verify pack' '
@@ -652,7 +652,7 @@ test_expect_success 'C: incremental import create pack from stdin' '
652
INPUT_END
653
654
git fast-import <input &&
655
- git whatchanged branch
655
+ git log --raw branch
656
'
657
658
test_expect_success 'C: verify pack' '
@@ -715,7 +715,7 @@ test_expect_success 'D: inline data in commit' '
715
INPUT_END
716
717
git fast-import <input &&
718
- git whatchanged branch
718
+ git log --raw branch
719
'
720
721
test_expect_success 'D: verify pack' '
@@ -882,7 +882,7 @@ test_expect_success 'H: deletall, add 1' '
882
883
INPUT_END
884
git fast-import <input &&
885
- git whatchanged H
885
+ git log --raw H
886
'
887
888
test_expect_success 'H: verify pack' '
@@ -2066,7 +2066,7 @@ test_expect_success 'Q: commit notes' '
2066
INPUT_END
2067
2068
git fast-import <input &&
2069
- git whatchanged notes-test
2069
+ git log --raw notes-test
2070
'
2071
2072
test_expect_success 'Q: verify pack' '
t/t9301-fast-import-notes.sh
+1
-1
@@ -76,7 +76,7 @@ INPUT_END
76
test_expect_success 'set up main branch' '
77
78
git fast-import <input &&
79
- git whatchanged main
79
+ git log --raw main
80
'
81
82
commit4=$(git rev-parse refs/heads/main)