diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-23 22:10:47 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-23 22:11:20 -0700 |
commit | ab69e89c7e95f309564c3967222bd39f0587a74c (patch) | |
tree | 6d8ce74f63a28fec1eacb611458c51bffdb2433c /t | |
parent | bd4b0aeb1f4db2d7552623f77b62b9a24f8cac9e (diff) | |
download | git-ab69e89c7e95f309564c3967222bd39f0587a74c.tar.gz |
t6030: grab commit object name as we go
Instead of running rev-list and picking earlier lines using head/tail pipeline,
grab commit object name as we build commits. This also removes a non POSIX
use of tail with -linenum (more posixly-correct way to say it is "-n linenum")
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-x | t/t6030-bisect-porcelain.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index 13e9379236..30f6ade13f 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@ -22,22 +22,25 @@ add_line_into_file() MSG="Create file <$_file> with <$_line> inside." fi - git-commit -m "$MSG" $_file + test_tick + git-commit --quiet -m "$MSG" $_file } HASH1= +HASH2= HASH3= HASH4= -test_expect_success \ - 'set up basic repo with 1 file (hello) and 4 commits' \ - 'add_line_into_file "1: Hello World" hello && +test_expect_success 'set up basic repo with 1 file (hello) and 4 commits' ' + add_line_into_file "1: Hello World" hello && + HASH1=$(git rev-parse --verify HEAD) && add_line_into_file "2: A new day for git" hello && + HASH2=$(git rev-parse --verify HEAD) && add_line_into_file "3: Another new day for git" hello && + HASH3=$(git rev-parse --verify HEAD) && add_line_into_file "4: Ciao for now" hello && - HASH1=$(git rev-list HEAD | tail -1) && - HASH3=$(git rev-list HEAD | head -2 | tail -1) && - HASH4=$(git rev-list HEAD | head -1)' + HASH4=$(git rev-parse --verify HEAD) +' test_expect_success 'bisect starts with only one bad' ' git bisect reset && |