test libs: rename "diff-lib" to "lib-diff"

Rename the "diff-lib" to "lib-diff". With this rename and preceding commits there is no remaining t/*lib* which doesn't follow the convention of being called t/lib-*. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 12, 2021 at 14:29 UTC ebd73f50c680ca0984aae18fad7b821464ed2411
23 files changed +30 -30
t/.gitattributes
+1 -1
@@ -1,6 +1,6 @@
1 t[0-9][0-9][0-9][0-9]/* -whitespace
2 /chainlint/*.expect eol=lf
3 -/diff-lib/* eol=lf
3 +/lib-diff/* eol=lf
4 /t0110/url-* binary
5 /t3206/* eol=lf
6 /t3900/*.txt eol=lf
t/lib-diff.sh renamed
t/lib-diff/COPYING renamed
t/lib-diff/README renamed
t/t4000-diff-format.sh
+1 -1
@@ -7,7 +7,7 @@ test_description='Test built-in diff output engine.
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh
10 +. "$TEST_DIRECTORY"/lib-diff.sh
11
12 echo >path0 'Line 1
13 Line 2
t/t4001-diff-rename.sh
+1 -1
@@ -7,7 +7,7 @@ test_description='Test rename detection in diff engine.
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh
10 +. "$TEST_DIRECTORY"/lib-diff.sh
11
12 test_expect_success 'setup' '
13 cat >path0 <<-\EOF &&
t/t4003-diff-rename-1.sh
+3 -3
@@ -7,11 +7,11 @@ test_description='More rename detection
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
10 +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
11
12 test_expect_success \
13 'prepare reference tree' \
14 - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
14 + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING &&
15 echo frotz >rezrov &&
16 git update-index --add COPYING rezrov &&
17 tree=$(git write-tree) &&
@@ -99,7 +99,7 @@ test_expect_success \
99
100 test_expect_success \
101 'prepare work tree once again' \
102 - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
102 + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING &&
103 git update-index --add --remove COPYING COPYING.1'
104
105 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
t/t4004-diff-rename-symlink.sh
+1 -1
@@ -10,7 +10,7 @@ copy of symbolic links, but should not produce rename/copy followed
10 by an edit for them.
11 '
12 . ./test-lib.sh
13 -. "$TEST_DIRECTORY"/diff-lib.sh
13 +. "$TEST_DIRECTORY"/lib-diff.sh
14
15 test_expect_success SYMLINKS \
16 'prepare reference tree' \
t/t4005-diff-rename-2.sh
+3 -3
@@ -6,10 +6,10 @@
6 test_description='Same rename detection as t4003 but testing diff-raw.'
7
8 . ./test-lib.sh
9 -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
9 +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
10
11 test_expect_success 'setup reference tree' '
12 - cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
12 + cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING &&
13 echo frotz >rezrov &&
14 git update-index --add COPYING rezrov &&
15 tree=$(git write-tree) &&
@@ -64,7 +64,7 @@ test_expect_success 'validate output from rename/copy detection (#2)' '
64 # nows how to say Copy.
65
66 test_expect_success 'validate output from rename/copy detection (#3)' '
67 - cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
67 + cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING &&
68 git update-index --add --remove COPYING COPYING.1 &&
69
70 cat <<-EOF >expected &&
t/t4007-rename-3.sh
+3 -3
@@ -7,17 +7,17 @@ test_description='Rename interaction with pathspec.
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
10 +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
11
12 test_expect_success 'prepare reference tree' '
13 mkdir path0 path1 &&
14 - cp "$TEST_DIRECTORY"/diff-lib/COPYING path0/COPYING &&
14 + cp "$TEST_DIRECTORY"/lib-diff/COPYING path0/COPYING &&
15 git update-index --add path0/COPYING &&
16 tree=$(git write-tree) &&
17 echo $tree
18 '
19
20 -blob=$(git hash-object "$TEST_DIRECTORY/diff-lib/COPYING")
20 +blob=$(git hash-object "$TEST_DIRECTORY/lib-diff/COPYING")
21 test_expect_success 'prepare work tree' '
22 cp path0/COPYING path1/COPYING &&
23 git update-index --add --remove path0/COPYING path1/COPYING
t/t4008-diff-break-rewrite.sh
+3 -3
@@ -22,11 +22,11 @@ With -B, this should be detected as two complete rewrites.
22 Further, with -B and -M together, these should turn into two renames.
23 '
24 . ./test-lib.sh
25 -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
25 +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
26
27 test_expect_success setup '
28 - cat "$TEST_DIRECTORY"/diff-lib/README >file0 &&
29 - cat "$TEST_DIRECTORY"/diff-lib/COPYING >file1 &&
28 + cat "$TEST_DIRECTORY"/lib-diff/README >file0 &&
29 + cat "$TEST_DIRECTORY"/lib-diff/COPYING >file1 &&
30 blob0_id=$(git hash-object file0) &&
31 blob1_id=$(git hash-object file1) &&
32 git update-index --add file0 file1 &&
t/t4009-diff-rename-4.sh
+3 -3
@@ -7,11 +7,11 @@ test_description='Same rename detection as t4003 but testing diff-raw -z.
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
10 +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
11
12 test_expect_success \
13 'prepare reference tree' \
14 - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
14 + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING &&
15 echo frotz >rezrov &&
16 git update-index --add COPYING rezrov &&
17 orig=$(git hash-object COPYING) &&
@@ -81,7 +81,7 @@ test_expect_success \
81
82 test_expect_success \
83 'prepare work tree once again' \
84 - 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
84 + 'cat "$TEST_DIRECTORY"/lib-diff/COPYING >COPYING &&
85 git update-index --add --remove COPYING COPYING.1'
86
87 git diff-index -z -C --find-copies-harder $tree >current
t/t4010-diff-pathspec.sh
+1 -1
@@ -10,7 +10,7 @@ Prepare:
10 path1/file1
11 '
12 . ./test-lib.sh
13 -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
13 +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
14
15 test_expect_success \
16 setup \
t/t4011-diff-symlink.sh
+1 -1
@@ -7,7 +7,7 @@ test_description='Test diff of symlinks.
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh
10 +. "$TEST_DIRECTORY"/lib-diff.sh
11
12 # Print the short OID of a symlink with the given name.
13 symlink_oid () {
t/t4013-diff-various.sh
+1 -1
@@ -9,7 +9,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10
11 . ./test-lib.sh
12 -. "$TEST_DIRECTORY"/diff-lib.sh
12 +. "$TEST_DIRECTORY"/lib-diff.sh
13
14 test_expect_success setup '
15
t/t4015-diff-whitespace.sh
+1 -1
@@ -7,7 +7,7 @@ test_description='Test special whitespace in diff engine.
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh
10 +. "$TEST_DIRECTORY"/lib-diff.sh
11
12 test_expect_success "Ray Lehtiniemi's example" '
13 cat <<-\EOF >x &&
t/t4027-diff-submodule.sh
+1 -1
@@ -3,7 +3,7 @@
3 test_description='difference in submodules'
4
5 . ./test-lib.sh
6 -. "$TEST_DIRECTORY"/diff-lib.sh
6 +. "$TEST_DIRECTORY"/lib-diff.sh
7
8 test_expect_success setup '
9 test_tick &&
t/t4034-diff-words.sh
+1 -1
@@ -3,7 +3,7 @@
3 test_description='word diff colors'
4
5 . ./test-lib.sh
6 -. "$TEST_DIRECTORY"/diff-lib.sh
6 +. "$TEST_DIRECTORY"/lib-diff.sh
7
8 cat >pre.simple <<-\EOF
9 h(4)
t/t4038-diff-combined.sh
+1 -1
@@ -6,7 +6,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 . ./test-lib.sh
9 -. "$TEST_DIRECTORY"/diff-lib.sh
9 +. "$TEST_DIRECTORY"/lib-diff.sh
10
11 setup_helper () {
12 one=$1 branch=$2 side=$3 &&
t/t4061-diff-indent.sh
+1 -1
@@ -7,7 +7,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
7 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh
10 +. "$TEST_DIRECTORY"/lib-diff.sh
11
12 # Compare two diff outputs. Ignore "index" lines, because we don't
13 # care about SHA-1s or file modes.
t/t4206-log-follow-harder-copies.sh
+1 -1
@@ -7,7 +7,7 @@ test_description='Test --follow should always find copies hard in git log.
7
8 '
9 . ./test-lib.sh
10 -. "$TEST_DIRECTORY"/diff-lib.sh
10 +. "$TEST_DIRECTORY"/lib-diff.sh
11
12 echo >path0 'Line 1
13 Line 2
t/t7501-commit-basic-functionality.sh
+1 -1
@@ -11,7 +11,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
11 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
12
13 . ./test-lib.sh
14 -. "$TEST_DIRECTORY/diff-lib.sh"
14 +. "$TEST_DIRECTORY/lib-diff.sh"
15
16 author='The Real Author <someguy@his.email.org>'
17
t/t9300-fast-import.sh
+1 -1
@@ -8,7 +8,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
8 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
9
10 . ./test-lib.sh
11 -. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
11 +. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
12
13 verify_packs () {
14 for p in .git/objects/pack/*.pack