From 5e6ab8607e4ae53c0abb5b3027904f1e3f539969 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 23 Jun 2006 17:56:11 -0700 Subject: Perl interface: make testsuite work again. Signed-off-by: Junio C Hamano --- t/test-lib.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index 05f6e79560..fba0c51d97 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -206,6 +206,8 @@ PYTHON=`sed -e '1{ PYTHONPATH=$(pwd)/../compat export PYTHONPATH } +PERL5LIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git +export PERL5LIB test -d ../templates/blt || { error "You haven't built things yet, have you?" } -- cgit v1.2.3 From d3140f5c2a6b42361bca960f627b00264d5c7372 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 2 Jul 2006 16:49:12 -0700 Subject: Perly Git: make sure we do test the freshly built one. We could BEGIN { push @INC, '@@INSTLIBDIR@@'; } but that is not a good idea for normal execution. The would prevent a workaround for a user who is trying to override an old, faulty Git.pm installed on the system path with a newer version installed under $HOME/. Signed-off-by: Junio C Hamano --- t/test-lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index fba0c51d97..298c6caa73 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -206,8 +206,9 @@ PYTHON=`sed -e '1{ PYTHONPATH=$(pwd)/../compat export PYTHONPATH } +RUNNING_GIT_TESTS=YesWeAre PERL5LIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git -export PERL5LIB +export PERL5LIB RUNNING_GIT_TESTS test -d ../templates/blt || { error "You haven't built things yet, have you?" } -- cgit v1.2.3 From 6fcca938b05c33bcd8b502d6b6f178e377609fa3 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 3 Jul 2006 23:16:32 +0200 Subject: Use $GITPERLLIB instead of $RUNNING_GIT_TESTS and centralize @INC munging This makes the Git perl scripts check $GITPERLLIB instead of $RUNNING_GIT_TESTS, which makes more sense if you are setting up your shell environment to use a non-installed Git instance. It also weeds out the @INC munging from the individual scripts and makes Makefile add it during the .perl files processing, so that we can change just a single place when we modify this shared logic. It looks ugly in the scripts, too. ;-) And instead of doing arcane things with the @INC array, we just do 'use lib' instead, which is essentialy the same thing anyway. I first want to do three separate patches but it turned out that it's quite a lot neater when bundled together, so I hope it's ok. Signed-off-by: Petr Baudis Signed-off-by: Junio C Hamano --- t/test-lib.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index 298c6caa73..ad9796ee98 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -206,9 +206,8 @@ PYTHON=`sed -e '1{ PYTHONPATH=$(pwd)/../compat export PYTHONPATH } -RUNNING_GIT_TESTS=YesWeAre -PERL5LIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git -export PERL5LIB RUNNING_GIT_TESTS +GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git +export GITPERLLIB test -d ../templates/blt || { error "You haven't built things yet, have you?" } -- cgit v1.2.3 From 4fddf5798d8a0eb112c60a05272a2d9407eafc8f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 1 Oct 2006 22:22:07 -0700 Subject: git-mv: invalidate the removed path properly in cache-tree The command updated the cache without invalidating the cache tree entries while removing an existing entry. Signed-off-by: Junio C Hamano --- t/t7001-mv.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 't') diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index b7fcdb390c..23a1eff3bb 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -86,4 +86,23 @@ test_expect_success \ 'move into "."' \ 'git-mv path1/path2/ .' +test_expect_success "Michael Cassar's test case" ' + rm -fr .git papers partA && + git init-db && + mkdir -p papers/unsorted papers/all-papers partA && + echo a > papers/unsorted/Thesis.pdf && + echo b > partA/outline.txt && + echo c > papers/unsorted/_another && + git add papers partA && + T1=`git write-tree` && + + git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf && + + T=`git write-tree` && + git ls-tree -r $T | grep partA/outline.txt || { + git ls-tree -r $T + (exit 1) + } +' + test_done -- cgit v1.2.3