Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t6133-pathspec-rev-dwim.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t6133-pathspec-rev-dwim.sh` 49 lines ยท 1127 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='test dwim of revs versus pathspecs in revision parser' 4 5 . ./test-lib.sh 6 7 test_expect_success 'setup' ' 8 test_commit base && 9 echo content >"br[ack]ets" && 10 git add . && 11 test_tick && 12 git commit -m brackets 13 ' 14 15 test_expect_success 'non-rev wildcard dwims to pathspec' ' 16 git log -- "*.t" >expect && 17 git log "*.t" >actual && 18 test_cmp expect actual 19 ' 20 21 test_expect_success 'tree:path with metacharacters dwims to rev' ' 22 git show "HEAD:br[ack]ets" -- >expect && 23 git show "HEAD:br[ack]ets" >actual && 24 test_cmp expect actual 25 ' 26 27 test_expect_success '^{foo} with metacharacters dwims to rev' ' 28 git log "HEAD^{/b.*}" -- >expect && 29 git log "HEAD^{/b.*}" >actual && 30 test_cmp expect actual 31 ' 32 33 test_expect_success '@{foo} with metacharacters dwims to rev' ' 34 git log "HEAD@{now [or thereabouts]}" -- >expect && 35 git log "HEAD@{now [or thereabouts]}" >actual && 36 test_cmp expect actual 37 ' 38 39 test_expect_success ':/*.t from a subdir dwims to a pathspec' ' 40 mkdir subdir && 41 ( 42 cd subdir && 43 git log -- ":/*.t" >expect && 44 git log ":/*.t" >actual && 45 test_cmp expect actual 46 ) 47 ' 48 49 test_done