Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adjusted git-test-sequence to eliminate usage of temporary branch bec…

…ause if you need to interrupt test-sequence then the temp branch gets left around. So instead, test-sequence simply checks out the hash to achieve the same purpose.
  • Loading branch information...
commit 7a963afb09e702a374456bf95d12ea79090e6fb5 1 parent 3ac33f0
Wayne Walter authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 git-test-sequence
View
10 git-test-sequence
@@ -18,15 +18,11 @@ case "$diff" in
esac
start_branch=`git rev-parse --symbolic-full-name HEAD | sed s,refs/heads/,,`
-tmpbranch=test_seq_$$
-
-git checkout -b $tmpbranch > /dev/null 2>/dev/null
+git checkout `git rev-parse HEAD` > /dev/null 2>/dev/null
cleanup() {
git checkout $start_branch > /dev/null 2>/dev/null
- git branch -D $tmpbranch > /dev/null
}
-
already_passed() {
git show-ref "refs/test/pass/pass-$v" "$v" > /dev/null && echo "Already passed $v"
}
@@ -37,6 +33,7 @@ already_failed() {
passed_on() {
git update-ref "refs/test/pass/pass-$v" "$v"
+ echo "Passed: $v."
}
broke_on() {
@@ -54,9 +51,8 @@ new_test() {
for v in `git rev-list --reverse $1`
do
- already_passed $v || already_failed $v || new_test $v $2
+ already_passed $v || already_failed $v || new_test $v "$2"
done
cleanup
-
echo "All's well."
Please sign in to comment.
Something went wrong with that request. Please try again.