swh:1:snp:6df5a50b8107b6bbe1e51d0239d816a7503c536a
Raw File
Tip revision: e267c2f6f0784e242883b7d3fe5f36ef63d6950d authored by Junio C Hamano on 15 November 2006, 06:11:26 UTC
GIT 1.4.4
Tip revision: e267c2f
t6004-rev-list-path-optim.sh
#!/bin/sh

test_description='git-rev-list trivial path optimization test'

. ./test-lib.sh

test_expect_success setup '
echo Hello > a &&
git add a &&
git commit -m "Initial commit" a
'

test_expect_success path-optimization '
    commit=$(echo "Unchanged tree" | git-commit-tree "HEAD^{tree}" -p HEAD) &&
    test $(git-rev-list $commit | wc -l) = 2 &&
    test $(git-rev-list $commit -- . | wc -l) = 1
'

test_done
back to top