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/t0101-at-syntax.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 / t0101-at-syntax.sh` 46 lines ยท 875 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='various @{whatever} syntax tests' 4 5 . ./test-lib.sh 6 7 test_expect_success 'setup' ' 8 test_commit one && 9 test_commit two 10 ' 11 12 check_at() { 13 echo "$2" >expect && 14 git log -1 --format=%s "$1" >actual && 15 test_cmp expect actual 16 } 17 18 test_expect_success '@{0} shows current' ' 19 check_at @{0} two 20 ' 21 22 test_expect_success '@{1} shows old' ' 23 check_at @{1} one 24 ' 25 26 test_expect_success '@{now} shows current' ' 27 check_at @{now} two 28 ' 29 30 test_expect_success '@{2001-09-17} (before the first commit) shows old' ' 31 check_at @{2001-09-17} one 32 ' 33 34 test_expect_success 'silly approxidates work' ' 35 check_at @{3.hot.dogs.on.2001-09-17} one 36 ' 37 38 test_expect_success 'notice misspelled upstream' ' 39 test_must_fail git log -1 --format=%s @{usptream} 40 ' 41 42 test_expect_success 'complain about total nonsense' ' 43 test_must_fail git log -1 --format=%s @{utter.bogosity} 44 ' 45 46 test_done