From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: Re: git-daemon shallow checkout fail
Date: Mon, 30 Jan 2017 18:27:31 +0100 [thread overview]
Message-ID: <20170130172730.x5guphyqf5fsfi7m@sigill.intra.peff.net> (raw)
In-Reply-To: <20170129002932.GA19359@dismay.proulx.com>
On Sat, Jan 28, 2017 at 05:29:32PM -0700, Bob Proulx wrote:
> However the problem driving me crazy is that this only fails this way
> on one machine. Unfortunately failing on the machine I need to use.
> If I try this same setup on any other machine I try then there is no
> failure and it works okay. Therefore I conclude that in the failing
> case it is trying to write a shallow_XXXXXX file in the repository but
> in all of the passing cases it does not. I browsed through the
> git-daemon source but couldn't deduce the flow yet.
>
> Does anyone know why one system would try to create shallow_XXXXXX
> files in the repository while another one would not?
It depends on the git version on the server. The interesting code is in
upload-pack.c, which is spawned by git-daemon to serve a fetch or clone
request.
See commit b790e0f67 (upload-pack: send shallow info over stdin to
pack-objects, 2014-03-11), which lays out the history. Since that commit
(in git v2.0.0), there should be no tmpfile needed.
> Of course git-daemon running as nobody can't create a temporary file
> shallow_XXXXXX in the /srv/git/test-project.git because it has no
> permissions by design. But why does this work on other systems and
> not work on my target system?
>
> git --version # from today's git clone build
> git version 2.11.0.485.g4e59582
This shouldn't be happening with git v2.11. Are you sure that the "git
daemon" invocation is running that same version? I notice you set up a
restricted PATH. Is it possible that /usr/local/bin or /usr/bin has an
older version of git?
-Peff
next prev parent reply other threads:[~2017-01-30 17:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-29 0:29 git-daemon shallow checkout fail Bob Proulx
2017-01-30 16:52 ` Johannes Schindelin
2017-02-07 0:27 ` Bob Proulx
2017-01-30 17:27 ` Jeff King [this message]
2017-02-02 9:26 ` Duy Nguyen
2017-02-07 0:27 ` Bob Proulx
2017-02-07 0:56 ` Bob Proulx
2017-02-07 11:07 ` Duy Nguyen
2017-02-07 22:49 ` Bob Proulx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170130172730.x5guphyqf5fsfi7m@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).