git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] Move remote parsing into a library file out of builtin-push.

From
Daniel Barkalow <barkalow@iabervon.org>
Date
May 10, 2007, 07:45 UTC
Message-ID
<Pine.LNX.4.64.0705100328260.18541@iabervon.org>
In-Reply-To
<7vhcqlma1l.fsf@assigned-by-dhcp.cox.net>
On Thu, 10 May 2007, Junio C Hamano wrote:
Show 14 quoted lines
> This seems to break t9400, with "fatal: bad repository 'gitcvs.git",
> upon "git push".
> 
> : gitster t/db/remote; sh t9400-git-cvsserver-server.sh -i -v
> * expecting success: cvs -Q co -d cvswork master &&
>    test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5))" = "empty/1.1/"
> cvs checkout: Updating cvswork
> U cvswork/empty
> *   ok 1: basic checkout
> 
> * expecting success: echo testfile1 >testfile1 &&
>    git add testfile1 &&
>    git commit -q -m "Add testfile1" &&
>    git push gitcvs.git >/dev/null &&

The man page doesn't think this is valid, since it only claims absolute paths to work for local repositories. (Current builtin-push seems to be sloppy; it has the die() that triggers in my version, but its read_config() always returns a value that doesn't trigger it, suggesting that there's some sort of bug.)

Following patch fixes t9400 to use absolute paths (assuming that's what it expects "git push gitcvs.git" to mean).

=== cut here === Local repository names for git-push are only documented with absolute paths, even though current git-push is lenient. Use an absolute path in t9400-git-cvsserver-server.sh.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index f17be6b..178b9b4 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -45,7 +45,7 @@ test_expect_success 'cvs update (create new file)' \
   'echo testfile1 >testfile1 &&
    git add testfile1 &&
    git commit -q -m "Add testfile1" &&
-   git push gitcvs.git >/dev/null &&
+   git push $(pwd)/gitcvs.git >/dev/null &&
    cd cvswork &&
    cvs -Q update &&
    test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.1/" &&
@@ -56,7 +56,7 @@ test_expect_success 'cvs update (update existing file)' \
   'echo line 2 >>testfile1 &&
    git add testfile1 &&
    git commit -q -m "Append to testfile1" &&
-   git push gitcvs.git >/dev/null &&
+   git push $(pwd)/gitcvs.git >/dev/null &&
    cd cvswork &&
    cvs -Q update &&
    test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.2/" &&
@@ -69,7 +69,7 @@ test_expect_failure "cvs update w/o -d doesn't create subdir (TODO)" \
    echo >test/empty &&
    git add test &&
    git commit -q -m "Single Subdirectory" &&
-   git push gitcvs.git >/dev/null &&
+   git push $(pwd)/gitcvs.git >/dev/null &&
    cd cvswork &&
    cvs -Q update &&
    test ! -d test'
@@ -82,7 +82,7 @@ test_expect_success 'cvs update (subdirectories)' \
       git add $dir;
    done) &&
    git commit -q -m "deep sub directory structure" &&
-   git push gitcvs.git >/dev/null &&
+   git push $(pwd)/gitcvs.git >/dev/null &&
    cd cvswork &&
    cvs -Q update -d &&
    (for dir in A A/B A/B/C A/D E; do
@@ -100,7 +100,7 @@ cd "$WORKDIR"
 test_expect_success 'cvs update (delete file)' \
   'git rm testfile1 &&
    git commit -q -m "Remove testfile1" &&
-   git push gitcvs.git >/dev/null &&
+   git push $(pwd)/gitcvs.git >/dev/null &&
    cd cvswork &&
    cvs -Q update &&
    test -z "$(grep testfile1 CVS/Entries)" &&
@@ -111,7 +111,7 @@ test_expect_success 'cvs update (re-add deleted file)' \
   'echo readded testfile >testfile1 &&
    git add testfile1 &&
    git commit -q -m "Re-Add testfile1" &&
-   git push gitcvs.git >/dev/null &&
+   git push $(pwd)/gitcvs.git >/dev/null &&
    cd cvswork &&
    cvs -Q update &&
    test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.4/" &&
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 10 in “Move remote parsing into a library file out of builtin-push.”
  1. 1/3 Move remote parsing into a library file out of builtin-push.Daniel Barkalow, May 10, 2007
  2. Junio C HamanoMay 10, 2007
  3. Daniel BarkalowMay 10, 2007
  4. Junio C HamanoMay 10, 2007
  5. Daniel BarkalowMay 10, 2007
  6. Junio C HamanoMay 10, 2007
  7. Daniel BarkalowMay 10, 2007
  8. Junio C HamanoMay 10, 2007
  9. Daniel BarkalowMay 10, 2007
  10. Junio C HamanoMay 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.