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

Re: [RFC] a tale of Git 2.5, ssh transport and GIT_* environment variables

From
Jeff King <peff@peff.net>
Date
Sep 4, 2015, 14:26 UTC
Message-ID
<20150904142630.GA11830@sigill.intra.peff.net>
In-Reply-To
<CAOxFTcwYJqFHrBkie19Fm3AqeYmSLRNBpBtOAkiYmfO9UgN-0g@mail.gmail.com>
On Fri, Sep 04, 2015 at 04:02:09PM +0200, Giuseppe Bilotta wrote:
> So, I've at least been able to circumscribe the problem to: server git
> 1.7.0.4, client git 2.5, GIT_WORK_TREE being sent over the ssh
> connection. I'll see if I can find some time to do some proper
> bisecting next week.

That sounds like progress. I was hoping I could replicate it with that information, but I still can't:

  LOCAL_GIT=git.v2.5.0
  REMOTE_GIT=/home/peff/compile/git/bin-wrappers/git
  $ $LOCAL_GIT version
  git version 2.5.0
  $ ssh git.peff.net $REMOTE_GIT version
  git version 1.7.0.4
  $ ssh git.peff.net "rm -rf /tmp/foo.git; $REMOTE_GIT init --bare /tmp/foo.git"
  $ GIT_DIR=$PWD/.git GIT_WORK_TREE=$PWD $LOCAL_GIT push \
      --receive-pack="env | grep GIT >&2; $REMOTE_GIT receive-pack" \
      git.peff.net:/tmp/foo.git HEAD:branch
  GIT_DIR=/home/peff/tmp/.git
  GIT_WORK_TREE=/home/peff/tmp
  GIT_PREFIX=
  Counting objects: 3, done.
  Writing objects: 100% (3/3), 208 bytes | 0 bytes/s, done.
  Total 3 (delta 0), reused 0 (delta 0)
  To git.peff.net:/tmp/foo.git
   * [new branch]      HEAD -> branch

Interestingly, if I try pushing straight to master, the remote side complains about trying to push the checked-out branch, even though it's a bare repo (presumably it's getting confused by the GIT_WORK_TREE setting; so that's _a_ bug, but not the one you are seeing).

So I'm not sure what is different about my setup and yours.
-Peff
Previous: Giuseppe BilottaNext: Junio C Hamano
Message 4 of 12 in “[RFC] a tale of Git 2.5, ssh transport and GIT_* environment variables”
  1. Giuseppe BilottaSep 4, 2015
  2. Jeff KingSep 4, 2015
  3. Giuseppe BilottaSep 4, 2015
  4. Jeff KingSep 4, 2015
  5. Junio C HamanoSep 4, 2015
  6. Giuseppe BilottaSep 4, 2015
  7. Jeff KingSep 4, 2015
  8. git_connect: clear GIT_* environment for sshJeff King, Sep 4, 2015
  9. Giuseppe BilottaSep 5, 2015
  10. git_connect: clarify conn->use_shell flagJeff King, Sep 8, 2015
  11. Junio C HamanoSep 8, 2015
  12. Jeff KingSep 8, 2015

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.