Git Mailing List Archive mirror
 help / color / mirror / Atom feed
blob ea4319fd15a1d3c4e08ec665073368cf659136bd 891 bytes (raw)
name: t/t3515-revert-subjects.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
 
#!/bin/sh

test_description='git revert produces the expected subject'

. ./test-lib.sh

test_expect_success 'fresh reverts' '
    test_commit --no-tag A file1 &&
    test_commit --no-tag B file1 &&
    git revert --no-edit HEAD &&
    echo "Revert \"B\"" > expect &&
    git log -1 --pretty=%s > actual &&
    test_cmp expect actual &&
    git revert --no-edit HEAD &&
    echo "Reapply \"B\"" > expect &&
    git log -1 --pretty=%s > actual &&
    test_cmp expect actual &&
    git revert --no-edit HEAD &&
    echo "Revert \"Reapply \"B\"\"" > expect &&
    git log -1 --pretty=%s > actual &&
    test_cmp expect actual
'

test_expect_success 'legacy double revert' '
    test_commit --no-tag "Revert \"Revert \"B\"\"" file1 &&
    git revert --no-edit HEAD &&
    echo "Revert \"Reapply \"B\"\"" > expect &&
    git log -1 --pretty=%s > actual &&
    test_cmp expect actual
'

test_done

debug log:

solving ea4319fd15 ...
found ea4319fd15 in https://80x24.org/lore/git/20230428083528.1699221-1-oswald.buddenhagen@gmx.de/

applying [1/1] https://80x24.org/lore/git/20230428083528.1699221-1-oswald.buddenhagen@gmx.de/
diff --git a/t/t3515-revert-subjects.sh b/t/t3515-revert-subjects.sh
new file mode 100755
index 0000000000..ea4319fd15

Checking patch t/t3515-revert-subjects.sh...
Applied patch t/t3515-revert-subjects.sh cleanly.

index at:
100755 ea4319fd15a1d3c4e08ec665073368cf659136bd	t/t3515-revert-subjects.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.^

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).