summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-13 13:37:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-13 13:37:26 (GMT)
commitf22838aa7a6dcf308a3307ba17f8afa40989ad3a (patch)
treef7e4b72da742a8e1fb4d86a2a17e9ff103841e5f /t
parente146cc97be4c054c60d38e9f4edcdc33205bf563 (diff)
parentaa097b88e91bd748c4508b042e618e8292e15ad5 (diff)
downloadgit-f22838aa7a6dcf308a3307ba17f8afa40989ad3a.zip
git-f22838aa7a6dcf308a3307ba17f8afa40989ad3a.tar.gz
git-f22838aa7a6dcf308a3307ba17f8afa40989ad3a.tar.bz2
Merge branch 'jk/misc-unused-fixes'
Assorted fixes for bugs found while auditing -Wunused-parameter warnings. * jk/misc-unused-fixes: approxidate: fix NULL dereference in date_time() pathspec: handle non-terminated strings with :(attr) approxidate: handle pending number for "specials" rev-list: handle flags for --indexed-objects
Diffstat (limited to 't')
-rwxr-xr-xt/t0006-date.sh2
-rwxr-xr-xt/t6000-rev-list-misc.sh7
2 files changed, 9 insertions, 0 deletions
diff --git a/t/t0006-date.sh b/t/t0006-date.sh
index 64ff86d..ffb2975 100755
--- a/t/t0006-date.sh
+++ b/t/t0006-date.sh
@@ -113,6 +113,8 @@ check_approxidate '3:00' '2009-08-30 03:00:00'
check_approxidate '15:00' '2009-08-30 15:00:00'
check_approxidate 'noon today' '2009-08-30 12:00:00'
check_approxidate 'noon yesterday' '2009-08-29 12:00:00'
+check_approxidate 'January 5th noon pm' '2009-01-05 12:00:00'
+check_approxidate '10am noon' '2009-08-29 12:00:00'
check_approxidate 'last tuesday' '2009-08-25 19:20:00'
check_approxidate 'July 5th' '2009-07-05 19:20:00'
diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh
index fb4d295..0507999 100755
--- a/t/t6000-rev-list-misc.sh
+++ b/t/t6000-rev-list-misc.sh
@@ -90,11 +90,18 @@ test_expect_success 'rev-list can show index objects' '
9200b628cf9dc883a85a7abc8d6e6730baee589c two
EOF
echo only-in-index >only-in-index &&
+ test_when_finished "git reset --hard" &&
git add only-in-index &&
git rev-list --objects --indexed-objects >actual &&
test_cmp expect actual
'
+test_expect_success 'rev-list can negate index objects' '
+ git rev-parse HEAD >expect &&
+ git rev-list -1 --objects HEAD --not --indexed-objects >actual &&
+ test_cmp expect actual
+'
+
test_expect_success '--bisect and --first-parent can not be combined' '
test_must_fail git rev-list --bisect --first-parent HEAD
'