1#!/bin/sh
23
test_description='git-rev-list trivial path optimization test'
45
. ./test-lib.sh
67
test_expect_success setup '
8echo Hello > a &&
9git add a &&
10git commit -m "Initial commit" a
11'
1213
test_expect_success path-optimization '
14commit=$(echo "Unchanged tree" | git-commit-tree "HEAD^{tree}" -p HEAD) &&
15test $(git-rev-list $commit | wc -l) = 2 &&
16test $(git-rev-list $commit -- . | wc -l) = 1
17'
1819
test_done