@@ -33,7 +33,7 @@ test_create_commit () (
33
33
git commit -m " $commit " || error " Could not commit"
34
34
)
35
35
36
- last_commit_message () {
36
+ last_commit_subject () {
37
37
git log --pretty=format:%s -1
38
38
}
39
39
@@ -74,7 +74,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --prefix' '
74
74
cd "$test_count" &&
75
75
git fetch ./"sub proj" HEAD &&
76
76
git subtree add --prefix="sub dir" FETCH_HEAD &&
77
- test "$(last_commit_message )" = "Add ' \' ' sub dir/' \' ' from commit ' \' ' $(git rev-parse FETCH_HEAD)' \' ' "
77
+ test "$(last_commit_subject )" = "Add ' \' ' sub dir/' \' ' from commit ' \' ' $(git rev-parse FETCH_HEAD)' \' ' "
78
78
)
79
79
'
80
80
@@ -87,7 +87,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --prefix and --me
87
87
cd "$test_count" &&
88
88
git fetch ./"sub proj" HEAD &&
89
89
git subtree add --prefix="sub dir" --message="Added subproject" FETCH_HEAD &&
90
- test "$(last_commit_message )" = "Added subproject"
90
+ test "$(last_commit_subject )" = "Added subproject"
91
91
)
92
92
'
93
93
@@ -100,7 +100,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --prefix as -P an
100
100
cd "$test_count" &&
101
101
git fetch ./"sub proj" HEAD &&
102
102
git subtree add -P "sub dir" -m "Added subproject" FETCH_HEAD &&
103
- test "$(last_commit_message )" = "Added subproject"
103
+ test "$(last_commit_subject )" = "Added subproject"
104
104
)
105
105
'
106
106
@@ -113,7 +113,7 @@ test_expect_success 'add subproj as subtree into sub dir/ with --squash and --pr
113
113
cd "$test_count" &&
114
114
git fetch ./"sub proj" HEAD &&
115
115
git subtree add --prefix="sub dir" --message="Added subproject with squash" --squash FETCH_HEAD &&
116
- test "$(last_commit_message )" = "Added subproject with squash"
116
+ test "$(last_commit_subject )" = "Added subproject with squash"
117
117
)
118
118
'
119
119
@@ -136,7 +136,7 @@ test_expect_success 'merge new subproj history into sub dir/ with --prefix' '
136
136
cd "$test_count" &&
137
137
git fetch ./"sub proj" HEAD &&
138
138
git subtree merge --prefix="sub dir" FETCH_HEAD &&
139
- test "$(last_commit_message )" = "Merge commit ' \' ' $(git rev-parse FETCH_HEAD)' \' ' "
139
+ test "$(last_commit_subject )" = "Merge commit ' \' ' $(git rev-parse FETCH_HEAD)' \' ' "
140
140
)
141
141
'
142
142
@@ -155,7 +155,7 @@ test_expect_success 'merge new subproj history into sub dir/ with --prefix and -
155
155
cd "$test_count" &&
156
156
git fetch ./"sub proj" HEAD &&
157
157
git subtree merge --prefix="sub dir" --message="Merged changes from subproject" FETCH_HEAD &&
158
- test "$(last_commit_message )" = "Merged changes from subproject"
158
+ test "$(last_commit_subject )" = "Merged changes from subproject"
159
159
)
160
160
'
161
161
@@ -174,7 +174,7 @@ test_expect_success 'merge new subproj history into sub dir/ with --squash and -
174
174
cd "$test_count" &&
175
175
git fetch ./"sub proj" HEAD &&
176
176
git subtree merge --prefix="sub dir" --message="Merged changes from subproject using squash" --squash FETCH_HEAD &&
177
- test "$(last_commit_message )" = "Merged changes from subproject using squash"
177
+ test "$(last_commit_subject )" = "Merged changes from subproject using squash"
178
178
)
179
179
'
180
180
@@ -209,7 +209,7 @@ test_expect_success 'merge new subproj history into subdir/ with a slash appende
209
209
cd "$test_count" &&
210
210
git fetch ./subproj HEAD &&
211
211
git subtree merge --prefix=subdir/ FETCH_HEAD &&
212
- test "$(last_commit_message )" = "Merge commit ' \' ' $(git rev-parse FETCH_HEAD)' \' ' "
212
+ test "$(last_commit_subject )" = "Merge commit ' \' ' $(git rev-parse FETCH_HEAD)' \' ' "
213
213
)
214
214
'
215
215
@@ -275,7 +275,7 @@ test_expect_success 'split sub dir/ with --rejoin' '
275
275
git subtree merge --prefix="sub dir" FETCH_HEAD &&
276
276
split_hash=$(git subtree split --prefix="sub dir" --annotate="*") &&
277
277
git subtree split --prefix="sub dir" --annotate="*" --rejoin &&
278
- test "$(last_commit_message )" = "Split ' \' ' sub dir/' \' ' into commit ' \' ' $split_hash' \' ' "
278
+ test "$(last_commit_subject )" = "Split ' \' ' sub dir/' \' ' into commit ' \' ' $split_hash' \' ' "
279
279
)
280
280
'
281
281
@@ -290,7 +290,7 @@ test_expect_success 'split sub dir/ with --rejoin from scratch' '
290
290
git commit -m"sub dir file" &&
291
291
split_hash=$(git subtree split --prefix="sub dir" --rejoin) &&
292
292
git subtree split --prefix="sub dir" --rejoin &&
293
- test "$(last_commit_message )" = "Split ' \' ' sub dir/' \' ' into commit ' \' ' $split_hash' \' ' "
293
+ test "$(last_commit_subject )" = "Split ' \' ' sub dir/' \' ' into commit ' \' ' $split_hash' \' ' "
294
294
)
295
295
'
296
296
@@ -313,7 +313,7 @@ test_expect_success 'split sub dir/ with --rejoin and --message' '
313
313
git fetch ./"sub proj" HEAD &&
314
314
git subtree merge --prefix="sub dir" FETCH_HEAD &&
315
315
git subtree split --prefix="sub dir" --message="Split & rejoin" --annotate="*" --rejoin &&
316
- test "$(last_commit_message )" = "Split & rejoin"
316
+ test "$(last_commit_subject )" = "Split & rejoin"
317
317
)
318
318
'
319
319
@@ -878,7 +878,7 @@ test_expect_success 'push split to subproj' '
878
878
git subtree push ./"sub proj" --prefix "sub dir" sub-branch-1 &&
879
879
cd ./"sub proj" &&
880
880
git checkout sub-branch-1 &&
881
- test "$(last_commit_message )" = "sub dir/main-sub3"
881
+ test "$(last_commit_subject )" = "sub dir/main-sub3"
882
882
)
883
883
'
884
884
0 commit comments