File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -120,4 +120,14 @@ test_expect_success \
120
120
grep "The value .bop. was provided to .* but it wasn.t expecting any more values" err
121
121
'
122
122
123
+ test_expect_success \
124
+ ' Config section is renamed' '
125
+ _assert_current_branch_name "xxx"
126
+ git config --local branch.xxx.stgit.autostash true &&
127
+ stg branch --rename yyy &&
128
+ _assert_branch_exists yyy &&
129
+ git config branch.yyy.stgit.autostash &&
130
+ ! git config --get-regexp "branch\\.xxx\\."
131
+ '
132
+
123
133
test_done
Original file line number Diff line number Diff line change @@ -4,11 +4,12 @@ test_description='Attempt to delete branches'
4
4
5
5
. ./test-lib.sh
6
6
7
- test_expect_success ' Initialize repo ' '
7
+ test_expect_success ' Initialize master branch ' '
8
8
stg init &&
9
9
test_commit p0 &&
10
10
test_commit p1 &&
11
- stg uncommit -n 2
11
+ stg uncommit -n 2 &&
12
+ git config branch.master.stgit.autostash true
12
13
'
13
14
14
15
test_expect_success ' Create a branch (and switch to it)' '
@@ -29,7 +30,9 @@ test_expect_success 'Make sure the branch ref was deleted' '
29
30
'
30
31
31
32
test_expect_success ' Make sure the branch config was deleted' '
32
- [ -z "$(git config -l | grep branch\\.master | tee /dev/stderr)" ]
33
+ [ -z "$(git config -l | grep branch\\.master | tee /dev/stderr)" ] &&
34
+ [ -z "$(git config -l | grep branch\\.master\\.stgit | tee /dev/stderr)" ] &&
35
+ test_expect_code 128 git config --remove-section branch.master.stgit
33
36
'
34
37
35
38
test_expect_success ' Make sure the branch files were deleted' '
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ test_expect_success 'Force cleanup branch with patches' '
36
36
test "$(stg series --noprefix --all)" = "" &&
37
37
command_error stg new -m p1 2>err &&
38
38
grep "Branch \`foo2\` not initialized" err &&
39
- test_expect_code 1 git config --get-regexp branch\\.foo2\\.stgit
39
+ test_expect_code 1 git config --get-regexp branch\\.foo2\\.stgit &&
40
+ test_expect_code 128 git config --remove-section branch.foo2.stgit
40
41
'
41
42
42
43
test_expect_success ' Commit patches' '
You can’t perform that action at this time.
0 commit comments