Display an error from update-ref if target ref name is invalid.
[git/jnareb-git.git] / t / t6004-rev-list-path-optim.sh
blob5182dbb15811ae518c1686c0a8f037a84d3cbd06
1 #!/bin/sh
3 test_description='git-rev-list trivial path optimization test'
5 . ./test-lib.sh
7 test_expect_success setup '
8 echo Hello > a &&
9 git add a &&
10 git commit -m "Initial commit" a
13 test_expect_success path-optimization '
14 commit=$(echo "Unchanged tree" | git-commit-tree "HEAD^{tree}" -p HEAD) &&
15 test $(git-rev-list $commit | wc -l) = 2 &&
16 test $(git-rev-list $commit -- . | wc -l) = 1
19 test_done