Skip to content

Commit ab4d188

Browse files
committed
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 <[email protected]> [en: log message] Signed-off-by: Junio C Hamano <[email protected]>
1 parent ba69a6c commit ab4d188

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

t/t9300-fast-import.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '
120120
121121
INPUT_END
122122
git fast-import --export-marks=marks.out <input &&
123-
git whatchanged main
123+
git log --raw main
124124
'
125125

126126
test_expect_success 'A: verify pack' '
@@ -279,7 +279,7 @@ test_expect_success 'A: verify marks import does not crash' '
279279
INPUT_END
280280
281281
git fast-import --import-marks=marks.out <input &&
282-
git whatchanged verify--import-marks
282+
git log --raw verify--import-marks
283283
'
284284

285285
test_expect_success 'A: verify pack' '
@@ -652,7 +652,7 @@ test_expect_success 'C: incremental import create pack from stdin' '
652652
INPUT_END
653653
654654
git fast-import <input &&
655-
git whatchanged branch
655+
git log --raw branch
656656
'
657657

658658
test_expect_success 'C: verify pack' '
@@ -715,7 +715,7 @@ test_expect_success 'D: inline data in commit' '
715715
INPUT_END
716716
717717
git fast-import <input &&
718-
git whatchanged branch
718+
git log --raw branch
719719
'
720720

721721
test_expect_success 'D: verify pack' '
@@ -882,7 +882,7 @@ test_expect_success 'H: deletall, add 1' '
882882
883883
INPUT_END
884884
git fast-import <input &&
885-
git whatchanged H
885+
git log --raw H
886886
'
887887

888888
test_expect_success 'H: verify pack' '
@@ -2066,7 +2066,7 @@ test_expect_success 'Q: commit notes' '
20662066
INPUT_END
20672067
20682068
git fast-import <input &&
2069-
git whatchanged notes-test
2069+
git log --raw notes-test
20702070
'
20712071

20722072
test_expect_success 'Q: verify pack' '

t/t9301-fast-import-notes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ INPUT_END
7676
test_expect_success 'set up main branch' '
7777
7878
git fast-import <input &&
79-
git whatchanged main
79+
git log --raw main
8080
'
8181

8282
commit4=$(git rev-parse refs/heads/main)

0 commit comments

Comments
 (0)