From a18e13f5798668eed82db6dab7c819b800627112 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 16 Oct 2026 06:11:54 -1000 Subject: Keep date-format=local-local from failing pages The guard took local as a name that may carry the -local suffix, but git reads local only as a whole alias of default-local and dies on anything after it, so that one value turned every page into a 500. --- tests/t0203-dates.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/t0203-dates.sh') diff --git a/tests/t0203-dates.sh b/tests/t0203-dates.sh index 02f12f1..3c8ecab 100755 --- a/tests/t0203-dates.sh +++ b/tests/t0203-dates.sh @@ -80,6 +80,19 @@ test_expect_success 'an unknown date-format falls back to short' ' grep "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]<" tmp ' +test_expect_success 'a date-format git would refuse falls back to short' ' + daterc "enable-relative-dates=0" "date-format=local-local" && + dateq "url=dated/refs/" >tmp && + grep "^Status: 200" tmp && + grep "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]<" tmp +' + +test_expect_success 'date-format=local is the default format in local time' ' + daterc "enable-relative-dates=0" "date-format=local" && + dateq "url=dated/refs/" >tmp && + grep ">[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]* [0-9:]* [0-9]*<" tmp +' + test_expect_success 'date-format still formats the log fallback' ' daterc "date-format=rfc2822" && dateq "url=dated/log/" >tmp && -- cgit