X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft6002-rev-list-bisect.sh;h=d0a4ff29c97ffde5f994971e80a8e094d8a8ccd0;hb=bb97a2a804e0afdd686ed9f18fed2ddc15833540;hp=dde5d865ba98e9cce266c9cae406bada7143fd30;hpb=8904591a9b7be14e14cb91bd4de2014f9c520710;p=git.git diff --git a/t/t6002-rev-list-bisect.sh b/t/t6002-rev-list-bisect.sh index dde5d865..d0a4ff29 100755 --- a/t/t6002-rev-list-bisect.sh +++ b/t/t6002-rev-list-bisect.sh @@ -5,14 +5,18 @@ test_description='Tests git-rev-list --bisect functionality' . ./test-lib.sh -. ../t6000-lib.sh +. ../t6000lib.sh # t6xxx specific functions bc_expr() { bc <=0) { return x; } else { return -x; } } -define floor(x) { save=scale; scale=0; result=x/1; scale=save; return result; } +define abs(x) { + if (x>=0) { return (x); } else { return (-x); } +} +define floor(x) { + save=scale; scale=0; result=x/1; scale=save; return (result); +} $* EOF } @@ -36,7 +40,7 @@ test_bisection_diff() } date >path0 -git-update-cache --add path0 +git-update-index --add path0 save_tag tree git-write-tree on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root @@ -113,16 +117,6 @@ on_committer_date "1971-08-16 00:00:04" save_tag u4 unique_commit u4 tree -p u0 on_committer_date "1971-08-16 00:00:05" save_tag u5 unique_commit u5 tree -p u0 on_committer_date "1971-08-16 00:00:06" save_tag V unique_commit V tree -p u1 -p u2 -p u3 -p u4 -p u5 - -# -# cd to t/trash and use -# -# git-rev-list ... 2>&1 | sed "$(cat sed.script)" -# -# if you ever want to manually debug the operation of git-rev-list -# -echo $sed_script > sed.script - test_sequence() { _bisect_option=$1