File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eu -o pipefail
3
+
4
+ git init;
5
+
6
+ function baseline() {
7
+ local test_date=$1 # first argument is the date to test
8
+
9
+ git -c section.key=" $test_date " config --type=expiry-date section.key && status=0 || status=$?
10
+ # git ls-files "$pathspec" && status=0 || status=$?
11
+ {
12
+ echo " $test_date "
13
+ echo " $status "
14
+ } >> baseline.git
15
+ }
16
+
17
+ # success
18
+
19
+ # date formats following to https://git-scm.com/docs/git-log#Documentation/git-log.txt---dateltformatgt
20
+ # short
21
+ baseline ' 2022-08-22'
22
+ # rfc2822
23
+ baseline ' Thu, 18 Aug 2022 12:45:06 +0800'
24
+ # iso8601
25
+ baseline ' 2022-08-17 22:04:58 +0200'
26
+ # iso8601_strict
27
+ baseline ' 2022-08-17T21:43:13+08:00'
28
+ # default
29
+ baseline ' Thu Sep 04 2022 10:45:06 -0400'
30
+ # unix
31
+ baseline ' 123456789'
32
+ # raw
33
+ baseline ' 1660874655 +0800'
34
+
35
+ # failing
36
+
37
+ # empty_input
38
+ baseline " "
39
+
You can’t perform that action at this time.
0 commit comments