]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: prepare for a world without whatchanged
authorJunio C Hamano <gitster@pobox.com>
Mon, 12 May 2025 19:03:08 +0000 (12:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 May 2025 22:29:18 +0000 (15:29 -0700)
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>
t/t9300-fast-import.sh
t/t9301-fast-import-notes.sh

index b258dbf1df79c11e266c71f831fe9d90bd2ca84b..4dc3d645bf9101604a3ecd54ca2e5ecc2dd35e08 100755 (executable)
@@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '
 
        INPUT_END
        git fast-import --export-marks=marks.out <input &&
-       git whatchanged main
+       git log --raw main
 '
 
 test_expect_success 'A: verify pack' '
@@ -279,7 +279,7 @@ test_expect_success 'A: verify marks import does not crash' '
        INPUT_END
 
        git fast-import --import-marks=marks.out <input &&
-       git whatchanged verify--import-marks
+       git log --raw verify--import-marks
 '
 
 test_expect_success 'A: verify pack' '
@@ -652,7 +652,7 @@ test_expect_success 'C: incremental import create pack from stdin' '
        INPUT_END
 
        git fast-import <input &&
-       git whatchanged branch
+       git log --raw branch
 '
 
 test_expect_success 'C: verify pack' '
@@ -715,7 +715,7 @@ test_expect_success 'D: inline data in commit' '
        INPUT_END
 
        git fast-import <input &&
-       git whatchanged branch
+       git log --raw branch
 '
 
 test_expect_success 'D: verify pack' '
@@ -882,7 +882,7 @@ test_expect_success 'H: deletall, add 1' '
 
        INPUT_END
        git fast-import <input &&
-       git whatchanged H
+       git log --raw H
 '
 
 test_expect_success 'H: verify pack' '
@@ -2066,7 +2066,7 @@ test_expect_success 'Q: commit notes' '
        INPUT_END
 
        git fast-import <input &&
-       git whatchanged notes-test
+       git log --raw notes-test
 '
 
 test_expect_success 'Q: verify pack' '
index 1ae4d7c0d37db2d10cbc08ce90505b291e70171b..e62173cf1f735a3b40a1712bd42b5a1717cd9bf3 100755 (executable)
@@ -76,7 +76,7 @@ INPUT_END
 test_expect_success 'set up main branch' '
 
        git fast-import <input &&
-       git whatchanged main
+       git log --raw main
 '
 
 commit4=$(git rev-parse refs/heads/main)