~ubuntu-branches/debian/sid/git/sid

« back to all changes in this revision

Viewing changes to t/t6030-bisect-porcelain.sh

  • Committer: Package Import Robot
  • Author(s): Jonathan Nieder
  • Date: 2013-06-12 07:50:53 UTC
  • mfrom: (1.2.19) (2.1.31 experimental)
  • Revision ID: package-import@ubuntu.com-20130612075053-uue9xe0dq0rvm44y
Tags: 1:1.8.3.1-1
* merge branch debian-experimental
* new upstream point release (see RelNotes/1.8.3.1.txt).
* debian/watch: use xz-compressed tarballs from kernel.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
        cp .git/BISECT_START saved &&
165
165
        test_must_fail git bisect start $HASH4 foo -- &&
166
166
        git branch > branch.output &&
167
 
        test_i18ngrep "* (no branch)" branch.output > /dev/null &&
 
167
        test_i18ngrep "* (no branch, bisect started on other)" branch.output > /dev/null &&
168
168
        test_cmp saved .git/BISECT_START
169
169
'
170
170
test_expect_success 'bisect start: no ".git/BISECT_START" if mistaken rev' '
190
190
# $HASH1 is good, $HASH4 is bad, we skip $HASH3
191
191
# but $HASH2 is bad,
192
192
# so we should find $HASH2 as the first bad commit
193
 
test_expect_success 'bisect skip: successfull result' '
 
193
test_expect_success 'bisect skip: successful result' '
194
194
        git bisect reset &&
195
195
        git bisect start $HASH4 $HASH1 &&
196
196
        git bisect skip &&
676
676
check_same()
677
677
{
678
678
        echo "Checking $1 is the same as $2" &&
679
 
        git rev-parse "$1" > expected.same &&
680
 
        git rev-parse "$2" > expected.actual &&
681
 
        test_cmp expected.same expected.actual
 
679
        test_cmp_rev "$1" "$2"
682
680
}
683
681
 
684
682
test_expect_success 'bisect: --no-checkout - start commit bad' '
743
741
        git bisect reset
744
742
"
745
743
 
 
744
cat > expected.bisect-log <<EOF
 
745
# bad: [32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
 
746
# good: [7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
 
747
git bisect start '32a594a3fdac2d57cf6d02987e30eec68511498c' '7b7f204a749c3125d5224ed61ea2ae1187ad046f'
 
748
# good: [3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
 
749
git bisect good 3de952f2416b6084f557ec417709eac740c6818c
 
750
# first bad commit: [32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
 
751
EOF
 
752
 
 
753
test_expect_success 'bisect log: successfull result' '
 
754
        git bisect reset &&
 
755
        git bisect start $HASH4 $HASH2 &&
 
756
        git bisect good &&
 
757
        git bisect log >bisect-log.txt &&
 
758
        test_cmp expected.bisect-log bisect-log.txt &&
 
759
        git bisect reset
 
760
'
 
761
 
 
762
cat > expected.bisect-skip-log <<EOF
 
763
# bad: [32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
 
764
# good: [7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
 
765
git bisect start '32a594a3fdac2d57cf6d02987e30eec68511498c' '7b7f204a749c3125d5224ed61ea2ae1187ad046f'
 
766
# skip: [3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
 
767
git bisect skip 3de952f2416b6084f557ec417709eac740c6818c
 
768
# only skipped commits left to test
 
769
# possible first bad commit: [32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
 
770
# possible first bad commit: [3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
 
771
EOF
 
772
 
 
773
test_expect_success 'bisect log: only skip commits left' '
 
774
        git bisect reset &&
 
775
        git bisect start $HASH4 $HASH2 &&
 
776
        test_must_fail git bisect skip &&
 
777
        git bisect log >bisect-skip-log.txt &&
 
778
        test_cmp expected.bisect-skip-log bisect-skip-log.txt &&
 
779
        git bisect reset
 
780
'
 
781
 
746
782
test_done