Skip to content

Commit

Permalink
t3407: rename a variable
Browse files Browse the repository at this point in the history
$dotest holds the name of the rebase state directory and was named
after the state directory used at the time the test was added. As we
no longer use that name rename the variable to reflect its purpose.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
phillipwood authored and gitster committed Sep 13, 2021
1 parent 7390c65 commit 54627db
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions t/t3407-rebase-abort.sh
Expand Up @@ -21,43 +21,43 @@ test_expect_success setup '

testrebase() {
type=$1
dotest=$2
state_dir=$2

test_expect_success "rebase$type --abort" '
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type main &&
test_path_is_dir "$dotest" &&
test_path_is_dir "$state_dir" &&
git rebase --abort &&
test_cmp_rev to-rebase pre-rebase &&
test ! -d "$dotest"
test ! -d "$state_dir"
'

test_expect_success "rebase$type --abort after --skip" '
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type main &&
test_path_is_dir "$dotest" &&
test_path_is_dir "$state_dir" &&
test_must_fail git rebase --skip &&
test_cmp_rev HEAD main &&
git rebase --abort &&
test_cmp_rev to-rebase pre-rebase &&
test ! -d "$dotest"
test ! -d "$state_dir"
'

test_expect_success "rebase$type --abort after --continue" '
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type main &&
test_path_is_dir "$dotest" &&
test_path_is_dir "$state_dir" &&
echo c > a &&
echo d >> a &&
git add a &&
test_must_fail git rebase --continue &&
test_cmp_rev ! HEAD main &&
git rebase --abort &&
test_cmp_rev to-rebase pre-rebase &&
test ! -d "$dotest"
test ! -d "$state_dir"
'

test_expect_success "rebase$type --abort does not update reflog" '
Expand Down

0 comments on commit 54627db

Please sign in to comment.