pack-objects: simplify --filter handling
[git/debian.git] / t / t4217-log-limit.sh
blob6e01e2629c1b158464ab29e4086fb4eeea16bbaa
1 #!/bin/sh
3 test_description='git log with filter options limiting the output'
5 . ./test-lib.sh
7 test_expect_success 'setup test' '
8 git init &&
9 echo a >file &&
10 git add file &&
11 GIT_COMMITTER_DATE="2021-02-01 00:00" git commit -m init &&
12 echo a >>file &&
13 git add file &&
14 GIT_COMMITTER_DATE="2022-02-01 00:00" git commit -m first &&
15 echo a >>file &&
16 git add file &&
17 GIT_COMMITTER_DATE="2021-03-01 00:00" git commit -m second &&
18 echo a >>file &&
19 git add file &&
20 GIT_COMMITTER_DATE="2022-03-01 00:00" git commit -m third
23 test_expect_success 'git log --since-as-filter=...' '
24 git log --since-as-filter="2022-01-01" --format=%s >actual &&
25 cat >expect <<-\EOF &&
26 third
27 first
28 EOF
29 test_cmp expect actual
32 test_expect_success 'git log --children --since-as-filter=...' '
33 git log --children --since-as-filter="2022-01-01" --format=%s >actual &&
34 cat >expect <<-\EOF &&
35 third
36 first
37 EOF
38 test_cmp expect actual
41 test_done