t / t4208-log-magic-pathspec.shon commit git p4: handle servers without move support (249da4c)
   1#!/bin/sh
   2
   3test_description='magic pathspec tests using git-log'
   4
   5. ./test-lib.sh
   6
   7test_expect_success 'setup' '
   8        test_commit initial &&
   9        test_tick &&
  10        git commit --allow-empty -m empty &&
  11        mkdir sub
  12'
  13
  14test_expect_success '"git log :/" should be ambiguous' '
  15        test_must_fail git log :/ 2>error &&
  16        grep ambiguous error
  17'
  18
  19test_expect_success '"git log :" should be ambiguous' '
  20        test_must_fail git log : 2>error &&
  21        grep ambiguous error
  22'
  23
  24test_expect_success 'git log -- :' '
  25        git log -- :
  26'
  27
  28test_expect_success 'git log HEAD -- :/' '
  29        cat >expected <<-EOF &&
  30        24b24cf initial
  31        EOF
  32        (cd sub && git log --oneline HEAD -- :/ >../actual) &&
  33        test_cmp expected actual
  34'
  35
  36test_done