Re: [PATCH 4/6] receive-pack: quarantine objects until pre-receive accepts

2017-04-10 Thread Jeff King
On Sat, Apr 08, 2017 at 04:53:38PM +0200, Ævar Arnfjörð Bjarmason wrote: > Very late reply, but I have a question about this. Is there anything > you can do on the plumbing level to figure out which area an object is > in (of course that's not mutually exclusive). > > The use-case for that is

Re: [PATCH 4/6] receive-pack: quarantine objects until pre-receive accepts

2017-04-08 Thread Ævar Arnfjörð Bjarmason
On Sat, Oct 1, 2016 at 11:12 AM, Jeff King wrote: > On Fri, Sep 30, 2016 at 03:36:30PM -0400, Jeff King wrote: > >> @@ -1639,6 +1666,18 @@ static const char *unpack(int err_fd, struct >> shallow_info *si) >> argv_array_push(, alt_shallow_file); >> } >> >> +

Re: [PATCH 4/6] receive-pack: quarantine objects until pre-receive accepts

2016-10-01 Thread Jeff King
On Fri, Sep 30, 2016 at 03:36:30PM -0400, Jeff King wrote: > @@ -1639,6 +1666,18 @@ static const char *unpack(int err_fd, struct > shallow_info *si) > argv_array_push(, alt_shallow_file); > } > > + tmp_objdir = tmp_objdir_create(); > + if (!tmp_objdir) > +

[PATCH 4/6] receive-pack: quarantine objects until pre-receive accepts

2016-09-30 Thread Jeff King
When a client pushes objects to us, index-pack checks the objects themselves and then installs them into place. If we then reject the push due to a pre-receive hook, we cannot just delete the packfile; other processes may be depending on it. We have to do a normal reachability check at this point