diff options
author | Steffen Prohaska <prohaska@zib.de> | 2008-01-26 10:54:06 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-01-26 17:58:18 -0800 |
commit | e509db990b2ecae642efe3cdef4014d57d525f24 (patch) | |
tree | b2c8ce5e08372d7645e24a0a2cb38e55520ed5c8 /t/t9400-git-cvsserver-server.sh | |
parent | 7549376587ba5ffea973663f72804072d8f1d5dd (diff) | |
download | git-e509db990b2ecae642efe3cdef4014d57d525f24.tar.gz git-e509db990b2ecae642efe3cdef4014d57d525f24.tar.xz |
cvsserver: Fix for histories with multiple roots
Git histories may have multiple roots, which can cause
git merge-base to fail and this caused git cvsserver to die.
This commit teaches git cvsserver to handle a failing git
merge-base gracefully, and modifies the test case to verify this.
All the test cases now use a history with two roots.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
git-cvsserver.perl | 9 ++++++++-
t/t9400-git-cvsserver-server.sh | 10 +++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9400-git-cvsserver-server.sh')
-rwxr-xr-x | t/t9400-git-cvsserver-server.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 1f2749eef..75d1ce433 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -37,6 +37,13 @@ test_expect_success 'setup' ' echo >empty && git add empty && git commit -q -m "First Commit" && + mkdir secondroot && + ( cd secondroot && + git init && + touch secondrootfile && + git add secondrootfile && + git commit -m "second root") && + git pull secondroot master && git clone -q --local --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 && GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true && GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" @@ -46,7 +53,8 @@ test_expect_success 'setup' ' # as argument to co -d test_expect_success 'basic checkout' \ 'GIT_CONFIG="$git_config" cvs -Q co -d cvswork master && - test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5))" = "empty/1.1/"' + test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))" = "empty/1.1/" + test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | tail -n 1))" = "secondrootfile/1.1/"' #------------------------ # PSERVER AUTHENTICATION |