1
1
#! /bin/sh
2
2
3
- test_description=' git- filter-branch'
3
+ test_description=' git filter-branch'
4
4
. ./test-lib.sh
5
5
6
6
make_commit () {
@@ -32,22 +32,22 @@ test_expect_success 'setup' '
32
32
H=$( git rev-parse H)
33
33
34
34
test_expect_success ' rewrite identically' '
35
- git- filter-branch branch
35
+ git filter-branch branch
36
36
'
37
37
test_expect_success ' result is really identical' '
38
38
test $H = $(git rev-parse HEAD)
39
39
'
40
40
41
41
test_expect_success ' rewrite bare repository identically' '
42
- (git config core.bare true && cd .git && git- filter-branch branch)
42
+ (git config core.bare true && cd .git && git filter-branch branch)
43
43
'
44
44
git config core.bare false
45
45
test_expect_success ' result is really identical' '
46
46
test $H = $(git rev-parse HEAD)
47
47
'
48
48
49
49
test_expect_success ' rewrite, renaming a specific file' '
50
- git- filter-branch -f --tree-filter "mv d doh || :" HEAD
50
+ git filter-branch -f --tree-filter "mv d doh || :" HEAD
51
51
'
52
52
53
53
test_expect_success ' test that the file was renamed' '
@@ -58,7 +58,7 @@ test_expect_success 'test that the file was renamed' '
58
58
'
59
59
60
60
test_expect_success ' rewrite, renaming a specific directory' '
61
- git- filter-branch -f --tree-filter "mv dir diroh || :" HEAD
61
+ git filter-branch -f --tree-filter "mv dir diroh || :" HEAD
62
62
'
63
63
64
64
test_expect_success ' test that the directory was renamed' '
@@ -73,7 +73,7 @@ test_expect_success 'test that the directory was renamed' '
73
73
git tag oldD HEAD~4
74
74
test_expect_success ' rewrite one branch, keeping a side branch' '
75
75
git branch modD oldD &&
76
- git- filter-branch -f --tree-filter "mv b boh || :" D..modD
76
+ git filter-branch -f --tree-filter "mv b boh || :" D..modD
77
77
'
78
78
79
79
test_expect_success ' common ancestor is still common (unchanged)' '
@@ -96,7 +96,7 @@ test_expect_success 'filter subdirectory only' '
96
96
test_tick &&
97
97
git commit -m "again not subdir" &&
98
98
git branch sub &&
99
- git- filter-branch -f --subdirectory-filter subdir refs/heads/sub
99
+ git filter-branch -f --subdirectory-filter subdir refs/heads/sub
100
100
'
101
101
102
102
test_expect_success ' subdirectory filter result looks okay' '
@@ -120,7 +120,7 @@ test_expect_success 'more setup' '
120
120
121
121
test_expect_success ' use index-filter to move into a subdirectory' '
122
122
git branch directorymoved &&
123
- git- filter-branch -f --index-filter \
123
+ git filter-branch -f --index-filter \
124
124
"git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
125
125
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
126
126
git update-index --index-info &&
@@ -129,7 +129,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
129
129
130
130
test_expect_success ' stops when msg filter fails' '
131
131
old=$(git rev-parse HEAD) &&
132
- test_must_fail git- filter-branch -f --msg-filter false HEAD &&
132
+ test_must_fail git filter-branch -f --msg-filter false HEAD &&
133
133
test $old = $(git rev-parse HEAD) &&
134
134
rm -rf .git-rewrite
135
135
'
@@ -140,7 +140,7 @@ test_expect_success 'author information is preserved' '
140
140
test_tick &&
141
141
GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips &&
142
142
git branch preserved-author &&
143
- git- filter-branch -f --msg-filter "cat; \
143
+ git filter-branch -f --msg-filter "cat; \
144
144
test \$GIT_COMMIT != $(git rev-parse master) || \
145
145
echo Hallo" \
146
146
preserved-author &&
@@ -152,7 +152,7 @@ test_expect_success "remove a certain author's commits" '
152
152
test_tick &&
153
153
git commit -m i i &&
154
154
git branch removed-author &&
155
- git- filter-branch -f --commit-filter "\
155
+ git filter-branch -f --commit-filter "\
156
156
if [ \"\$GIT_AUTHOR_NAME\" = \"B V Uips\" ];\
157
157
then\
158
158
skip_commit \"\$@\";
0 commit comments