Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-08-31 06:31:42 +0400
committerJunio C Hamano <gitster@pobox.com>2009-08-31 09:04:56 +0400
commit931e8e27d94dbc24abc9c969ae0b414e0361abff (patch)
treecd72a65adcd41a0805b74d1886ee9bae7bf2841d /t/t0006-date.sh
parent34dc6e73b01011fcbe0f314d47fd6120382ae145 (diff)
fix approxidate parsing of relative months and years
These were broken by b5373e9. The problem is that the code marks the month and year with "-1" for "we don't know it yet", but the month and year code paths were not adjusted to fill in the current time before doing their calculations (whereas other units follow a different code path and are fine). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0006-date.sh')
-rwxr-xr-xt/t0006-date.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0006-date.sh b/t/t0006-date.sh
index 02cd5659f7..a4d8fa8fa1 100755
--- a/t/t0006-date.sh
+++ b/t/t0006-date.sh
@@ -53,8 +53,8 @@ check_approxidate 10.minutes.ago '2009-08-30 19:10:00'
check_approxidate yesterday '2009-08-29 19:20:00'
check_approxidate 3.days.ago '2009-08-27 19:20:00'
check_approxidate 3.weeks.ago '2009-08-09 19:20:00'
-check_approxidate 3.months.ago '2009-05-30 19:20:00' failure
-check_approxidate 2.years.3.months.ago '2007-05-30 19:20:00' failure
+check_approxidate 3.months.ago '2009-05-30 19:20:00'
+check_approxidate 2.years.3.months.ago '2007-05-30 19:20:00'
check_approxidate '6am yesterday' '2009-08-29 06:00:00'
check_approxidate '6pm yesterday' '2009-08-29 18:00:00'