3 # Test that the guilt.reusebranch=true setting works.
6 source $REG_DIR/scaffold
10 if git rev-parse
--verify --quiet guilt
/master
>/dev
/null
; then
11 cmd git checkout guilt
/master
13 cmd git checkout master
17 cmd
rm -r .git
/patches
/$1
22 function fixup_time_info
24 touch -a -m -t "$TOUCH_DATE" ".git/patches/master/$1"
29 cmd git config guilt.reusebranch true
48 # Check that "pop -a" properly pops all patches.
54 # Check that pushing two patches converts the repo to now-style (since
55 # it currently has no patches applied).
59 # Check guilt branch with a few patches applied.
60 cmd guilt branch topic
63 # Check that the topic branch is converted to new-style.
70 # Check guilt branch with the full patch series applied.
72 cmd guilt branch topic
77 # Check guilt branch with no patches applied.
78 # This gives us a new-style checkout.
79 cmd guilt branch topic
85 # Check guilt branch in a new-style directory with all patches
86 # applied. (Strictly speaking, this test should probably move to a
87 # file devoted to testing "guilt branch".)
89 cmd guilt branch topic
97 # Check that "guilt new" does the right thing when no patches are
98 # applied. (Strictly speaking, this test should maybe move to
101 cmd guilt new newpatch
102 cmd git for-each-ref
'--format=%(refname)'
104 fixup_time_info newpatch
108 # Check that "guilt commit" does the right thing when committing all
109 # applied patches. (Strictly speaking, this test should maybe move to
117 # Check that "guilt commit" does the right thing when committing only
118 # a few of the applied patches. (Strictly speaking, this test should
119 # maybe move to t-030.sh).
124 cmd guilt commit
-n 2
127 cmd guilt commit
-n 2