use 'got commit' in test_rebase_delete_missing_file instead of Git
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
diff --git a/regress/cmdline/rebase.sh b/regress/cmdline/rebase.sh
index 2082741..6b8664a 100755
--- a/regress/cmdline/rebase.sh
+++ b/regress/cmdline/rebase.sh
@@ -1065,28 +1065,31 @@ function test_rebase_delete_missing_file {
git_commit $testroot/repo -m "adding a subdir"
local commit0=`git_show_head $testroot/repo`
- (cd $testroot/repo && git checkout -q -b newbranch)
- echo "modified delta on branch" > $testroot/repo/gamma/delta
- git_commit $testroot/repo -m "committing to delta on newbranch"
+ got br -r $testroot/repo -c master newbranch
+
+ got checkout -b newbranch $testroot/repo $testroot/wt > /dev/null
- (cd $testroot/repo && git rm -q beta d/f/g/new)
- git_commit $testroot/repo -m "deleting beta and d/f/g/new on newbranch"
+ echo "modified delta on branch" > $testroot/wt/gamma/delta
+ (cd $testroot/wt && got commit \
+ -m "committing to delta on newbranch" > /dev/null)
+ (cd $testroot/wt && got rm beta d/f/g/new > /dev/null)
+ (cd $testroot/wt && got commit \
+ -m "removing beta and d/f/g/new on newbranch" > /dev/null)
+
+ (cd $testroot/repo && git checkout -q newbranch)
local orig_commit1=`git_show_parent_commit $testroot/repo`
local orig_commit2=`git_show_head $testroot/repo`
+ (cd $testroot/wt && got update -b master > /dev/null)
+ (cd $testroot/wt && got rm beta d/f/g/new > /dev/null)
+ (cd $testroot/wt && got commit \
+ -m "removing beta and d/f/g/new on master" > /dev/null)
+
(cd $testroot/repo && git checkout -q master)
- (cd $testroot/repo && git rm -q beta d/f/g/new)
- git_commit $testroot/repo -m "removing beta and d/f/g/new on master"
local master_commit=`git_show_head $testroot/repo`
- got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
- test_done "$testroot" "$ret"
- return 1
- fi
-
+ (cd $testroot/wt && got update -b master > /dev/null)
(cd $testroot/wt && got rebase newbranch > $testroot/stdout)
(cd $testroot/repo && git checkout -q newbranch)
@@ -1104,7 +1107,7 @@ function test_rebase_delete_missing_file {
echo "! d/f/g/new" >> $testroot/stdout.expected
echo -n "$short_orig_commit2 -> no-op change" \
>> $testroot/stdout.expected
- echo ": deleting beta and d/f/g/new on newbranch" \
+ echo ": removing beta and d/f/g/new on newbranch" \
>> $testroot/stdout.expected
echo "Switching work tree to refs/heads/newbranch" \
>> $testroot/stdout.expected