summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c697ad1)
raw | patch | inline | side by side (parent: c697ad1)
author | Bryan Donlan <bdonlan@fushizen.net> | |
Sun, 4 May 2008 05:37:51 +0000 (01:37 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 May 2008 21:17:00 +0000 (14:17 -0700) |
Also update t/t3407-rebase-abort.sh to expose the bug.
Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh | patch | blob | history | |
t/t3407-rebase-abort.sh | patch | blob | history |
diff --git a/git-rebase.sh b/git-rebase.sh
index 9b13b833cb5762542848ee3e85e23d3ca0f76fa6..c43afe51abe065950f3d3ba2aa71bb157dd04bc8 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
else
die "No rebase in progress?"
fi
- git reset --hard $(cat $dotest/orig-head)
+ git reset --hard $(cat "$dotest/orig-head")
rm -r "$dotest"
exit
;;
index 37944c39a3be5e8d2db59faa5609d857fe902199..1777ffe8a22d8f9dd28efadd3cb9ea65be9c2178 100755 (executable)
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
. ./test-lib.sh
+### Test that we handle space characters properly
+work_dir="$(pwd)/test dir"
+
test_expect_success setup '
+ mkdir -p "$work_dir" &&
+ cd "$work_dir" &&
+ git init &&
echo a > a &&
git add a &&
git commit -m a &&
dotest=$2
test_expect_success "rebase$type --abort" '
+ cd "$work_dir" &&
# Clean up the state from the previous one
- git reset --hard pre-rebase
- test_must_fail git rebase'"$type"' master &&
- test -d '$dotest' &&
+ git reset --hard pre-rebase &&
+ test_must_fail git rebase$type master &&
+ test -d "$dotest" &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
- test ! -d '$dotest'
+ test ! -d "$dotest"
'
test_expect_success "rebase$type --abort after --skip" '
+ cd "$work_dir" &&
# Clean up the state from the previous one
- git reset --hard pre-rebase
- test_must_fail git rebase'"$type"' master &&
- test -d '$dotest' &&
+ git reset --hard pre-rebase &&
+ test_must_fail git rebase$type master &&
+ test -d "$dotest" &&
test_must_fail git rebase --skip &&
test $(git rev-parse HEAD) = $(git rev-parse master) &&
git-rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
- test ! -d '$dotest'
+ test ! -d "$dotest"
'
test_expect_success "rebase$type --abort after --continue" '
+ cd "$work_dir" &&
# Clean up the state from the previous one
- git reset --hard pre-rebase
- test_must_fail git rebase'"$type"' master &&
- test -d '$dotest' &&
+ git reset --hard pre-rebase &&
+ test_must_fail git rebase$type master &&
+ test -d "$dotest" &&
echo c > a &&
echo d >> a &&
git add a &&
test $(git rev-parse HEAD) != $(git rev-parse master) &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
- test ! -d '$dotest'
+ test ! -d "$dotest"
'
}