blob 59496a56b77aac06b32cee837942ee6de35bb22b 1466 bytes (raw)
name: t/t3503-cherry-pick-root.sh # note: path name is non-authoritative(*)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
| | #!/bin/sh
test_description='test cherry-picking (and reverting) a root commit'
. ./test-lib.sh
test_expect_success setup '
echo first > file1 &&
git add file1 &&
test_tick &&
git commit -m "first" &&
git symbolic-ref HEAD refs/heads/second &&
rm .git/index file1 &&
echo second > file2 &&
git add file2 &&
test_tick &&
git commit -m "second" &&
git symbolic-ref HEAD refs/heads/third &&
rm .git/index file2 &&
echo third > file3 &&
git add file3 &&
test_tick &&
git commit -m "third"
'
test_expect_success 'cherry-pick a root commit' '
git checkout second^0 &&
git cherry-pick main &&
echo first >expect &&
test_cmp expect file1
'
test_expect_success 'revert a root commit' '
git revert main &&
test_path_is_missing file1
'
test_expect_success 'cherry-pick a root commit with an external strategy' '
git cherry-pick --strategy=resolve main &&
echo first >expect &&
test_cmp expect file1
'
test_expect_success 'revert a root commit with an external strategy' '
git revert --strategy=resolve main &&
test_path_is_missing file1
'
test_expect_success 'cherry-pick two root commits' '
echo first >expect.file1 &&
echo second >expect.file2 &&
echo third >expect.file3 &&
git checkout second^0 &&
git cherry-pick main third &&
test_cmp expect.file1 file1 &&
test_cmp expect.file2 file2 &&
test_cmp expect.file3 file3 &&
git rev-parse --verify HEAD^^ &&
test_must_fail git rev-parse --verify HEAD^^^
'
test_done
|
debug log:
solving 59496a56b7 ...
found 59496a56b7 in https://public-inbox.org/git/7a9349653dda0723b11484a9923e58fba11f254c.1605221039.git.gitgitgadget@gmail.com/ ||
https://public-inbox.org/git/0cf754646e13bcbe117834addbf7d281f66a7955.1605629548.git.gitgitgadget@gmail.com/
found e27f39d1e5 in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100755 e27f39d1e5b0fb0ac3a1fc6417f0f3240934f07d t/t3503-cherry-pick-root.sh
applying [1/1] https://public-inbox.org/git/7a9349653dda0723b11484a9923e58fba11f254c.1605221039.git.gitgitgadget@gmail.com/
diff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh
index e27f39d1e5..59496a56b7 100755
Checking patch t/t3503-cherry-pick-root.sh...
Applied patch t/t3503-cherry-pick-root.sh cleanly.
skipping https://public-inbox.org/git/0cf754646e13bcbe117834addbf7d281f66a7955.1605629548.git.gitgitgadget@gmail.com/ for 59496a56b7
index at:
100755 59496a56b77aac06b32cee837942ee6de35bb22b t/t3503-cherry-pick-root.sh
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).