blob 6658c919fdf9afdc705d47dea209fae192bcd84f 2067 bytes (raw)
name: t/t4218-ahead-behind.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
| | #!/bin/sh
test_description='git ahead-behind command-line options'
. ./test-lib.sh
test_expect_success 'setup simple history' '
test_commit base &&
git checkout -b right &&
test_commit right &&
git checkout -b left base &&
test_commit left &&
git checkout -b merge &&
git merge right -m "merge"
'
test_expect_success 'git ahead-behind -h' '
test_must_fail git ahead-behind -h >out &&
grep "usage:" out
'
test_expect_success 'git ahead-behind without --base' '
test_must_fail git ahead-behind HEAD 2>err &&
grep "usage:" err
'
test_expect_success 'git ahead-behind with broken --base' '
test_must_fail git ahead-behind --base=bogus HEAD 2>err &&
grep "could not resolve '\''bogus'\''" err
'
test_expect_success 'git ahead-behind with broken tip' '
test_must_fail git ahead-behind --base=HEAD bogus 2>err &&
grep "could not resolve '\''bogus'\''" err
'
test_expect_success 'git ahead-behind with broken tip and --ignore-missing' '
git ahead-behind --base=HEAD --ignore-missing bogus 2>err >out &&
test_must_be_empty err &&
test_must_be_empty out
'
test_expect_success 'git ahead-behind without tips' '
git ahead-behind --base=HEAD 2>err &&
test_must_be_empty err
'
test_expect_success 'git ahead-behind --base=base' '
git ahead-behind --base=base base left right merge >actual &&
cat >expect <<-EOF &&
base 0 0
left 1 0
right 1 0
merge 3 0
EOF
test_cmp expect actual
'
test_expect_success 'git ahead-behind --base=left' '
git ahead-behind --base=left base left right merge >actual &&
cat >expect <<-EOF &&
base 0 1
left 0 0
right 1 1
merge 2 0
EOF
test_cmp expect actual
'
test_expect_success 'git ahead-behind --base=right' '
git ahead-behind --base=right base left right merge >actual &&
cat >expect <<-EOF &&
base 0 1
left 1 1
right 0 0
merge 2 0
EOF
test_cmp expect actual
'
test_expect_success 'git ahead-behind --base=merge' '
git ahead-behind --base=merge base left right merge >actual &&
cat >expect <<-EOF &&
base 0 3
left 0 2
right 0 2
merge 0 0
EOF
test_cmp expect actual
'
test_done
|
debug log:
solving 6658c919fdf ...
found 6658c919fdf in https://public-inbox.org/git/b8c55ecf88d6229f13e05e8369adaf9e70ae1de0.1678111599.git.gitgitgadget@gmail.com/
found 56f16515896 in https://public-inbox.org/git/b1d022c7cac5aed6e2d64b45f20dba5b3297536c.1678111599.git.gitgitgadget@gmail.com/
found 3b8b9dc9887 in https://public-inbox.org/git/08fc0710017d4b6178a8c5772e0f15fc69c84ad6.1678111599.git.gitgitgadget@gmail.com/
found bc08f1207a0 in https://public-inbox.org/git/0fd18b6d740f1e8a6f62a25947bc3ad49c2674a6.1678111599.git.gitgitgadget@gmail.com/
applying [1/4] https://public-inbox.org/git/0fd18b6d740f1e8a6f62a25947bc3ad49c2674a6.1678111599.git.gitgitgadget@gmail.com/
diff --git a/t/t4218-ahead-behind.sh b/t/t4218-ahead-behind.sh
new file mode 100755
index 00000000000..bc08f1207a0
applying [2/4] https://public-inbox.org/git/08fc0710017d4b6178a8c5772e0f15fc69c84ad6.1678111599.git.gitgitgadget@gmail.com/
diff --git a/t/t4218-ahead-behind.sh b/t/t4218-ahead-behind.sh
index bc08f1207a0..3b8b9dc9887 100755
applying [3/4] https://public-inbox.org/git/b1d022c7cac5aed6e2d64b45f20dba5b3297536c.1678111599.git.gitgitgadget@gmail.com/
diff --git a/t/t4218-ahead-behind.sh b/t/t4218-ahead-behind.sh
index 3b8b9dc9887..56f16515896 100755
applying [4/4] https://public-inbox.org/git/b8c55ecf88d6229f13e05e8369adaf9e70ae1de0.1678111599.git.gitgitgadget@gmail.com/
diff --git a/t/t4218-ahead-behind.sh b/t/t4218-ahead-behind.sh
index 56f16515896..6658c919fdf 100755
Checking patch t/t4218-ahead-behind.sh...
Applied patch t/t4218-ahead-behind.sh cleanly.
Checking patch t/t4218-ahead-behind.sh...
Applied patch t/t4218-ahead-behind.sh cleanly.
Checking patch t/t4218-ahead-behind.sh...
Applied patch t/t4218-ahead-behind.sh cleanly.
Checking patch t/t4218-ahead-behind.sh...
Applied patch t/t4218-ahead-behind.sh cleanly.
index at:
100755 6658c919fdf9afdc705d47dea209fae192bcd84f t/t4218-ahead-behind.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).