3 test_description
='test dwim of revs versus pathspecs in revision parser'
6 test_expect_success
'setup' '
8 echo content >"br[ack]ets" &&
11 git commit -m brackets
14 test_expect_success
'non-rev wildcard dwims to pathspec' '
15 git log -- "*.t" >expect &&
16 git log "*.t" >actual &&
17 test_cmp expect actual
20 test_expect_success
'tree:path with metacharacters dwims to rev' '
21 git show "HEAD:br[ack]ets" -- >expect &&
22 git show "HEAD:br[ack]ets" >actual &&
23 test_cmp expect actual
26 test_expect_success
'^{foo} with metacharacters dwims to rev' '
27 git log "HEAD^{/b.*}" -- >expect &&
28 git log "HEAD^{/b.*}" >actual &&
29 test_cmp expect actual
32 test_expect_success
'@{foo} with metacharacters dwims to rev' '
33 git log "HEAD@{now [or thereabouts]}" -- >expect &&
34 git log "HEAD@{now [or thereabouts]}" >actual &&
35 test_cmp expect actual
38 test_expect_success
':/*.t from a subdir dwims to a pathspec' '
42 git log -- ":/*.t" >expect &&
43 git log ":/*.t" >actual &&
44 test_cmp expect actual