@@ -16,46 +16,43 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
16
16
GIT_AUTHOR_EMAIL=bogus_email_address
17
17
export GIT_AUTHOR_EMAIL
18
18
19
- test_expect_success \
20
- ' prepare repository with topic branch, and check cherry finds the 2 patches from there' \
21
- ' echo First > A &&
22
- git update-index --add A &&
23
- test_tick &&
24
- git commit -m "Add A." &&
25
-
26
- git checkout -b my-topic-branch &&
27
-
28
- echo Second > B &&
29
- git update-index --add B &&
30
- test_tick &&
31
- git commit -m "Add B." &&
32
-
33
- echo AnotherSecond > C &&
34
- git update-index --add C &&
35
- test_tick &&
36
- git commit -m "Add C." &&
37
-
38
- git checkout -f main &&
39
- rm -f B C &&
40
-
41
- echo Third >> A &&
42
- git update-index A &&
43
- test_tick &&
44
- git commit -m "Modify A." &&
45
-
46
- expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* + .*"
19
+ test_expect_success ' prepare repository with topic branch, and check cherry finds the 2 patches from there' '
20
+ echo First > A &&
21
+ git update-index --add A &&
22
+ test_tick &&
23
+ git commit -m "Add A." &&
24
+
25
+ git checkout -b my-topic-branch &&
26
+
27
+ echo Second > B &&
28
+ git update-index --add B &&
29
+ test_tick &&
30
+ git commit -m "Add B." &&
31
+
32
+ echo AnotherSecond > C &&
33
+ git update-index --add C &&
34
+ test_tick &&
35
+ git commit -m "Add C." &&
36
+
37
+ git checkout -f main &&
38
+ rm -f B C &&
39
+
40
+ echo Third >> A &&
41
+ git update-index A &&
42
+ test_tick &&
43
+ git commit -m "Modify A." &&
44
+
45
+ expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* + .*"
47
46
'
48
47
49
- test_expect_success \
50
- ' check that cherry with limit returns only the top patch' \
51
- ' expr "$(echo $(git cherry main my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
48
+ test_expect_success ' check that cherry with limit returns only the top patch' '
49
+ expr "$(echo $(git cherry main my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
52
50
'
53
51
54
- test_expect_success \
55
- ' cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \
56
- ' git cherry-pick my-topic-branch^0 &&
57
- echo $(git cherry main my-topic-branch) &&
58
- expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* - .*"
52
+ test_expect_success ' cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' '
53
+ git cherry-pick my-topic-branch^0 &&
54
+ echo $(git cherry main my-topic-branch) &&
55
+ expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* - .*"
59
56
'
60
57
61
58
test_expect_success ' cherry ignores whitespace' '
0 commit comments