From: Jeff King <peff@peff.net>
To: Nasser Grainawi <nasser@codeaurora.org>
Cc: git@vger.kernel.org
Subject: Re: git receive-pack deletes refs one at a time?
Date: Thu, 13 Jun 2019 17:20:05 -0400 [thread overview]
Message-ID: <20190613212005.GA1970@sigill.intra.peff.net> (raw)
In-Reply-To: <34FD9B2B-D53A-4CD2-AEF0-3AFAF1586EB7@codeaurora.org>
On Thu, Jun 13, 2019 at 01:46:05PM -0600, Nasser Grainawi wrote:
> > The underlying ref code is smart enough to coalesce all of the deletions
> > in a single transaction into a single write of the packed-refs file.
> >
> > But historically, pushes do not do a single ref transaction because we
> > would allow the push for one ref to succeed while others failed. Later,
> > we added an "atomic" mode that does it all in a single transaction.
> >
> > Try with "git push --atomic", which should be able to do it in a single
> > write.
>
> Thanks!
>
> Is there a way to get the bulk behavior without the all-or-nothing behavior?
No, I don't think so. In theory the ref backend code could have a
"non-atomic" flag that lets it do as much as possible of a single
transaction. But nobody has ever implemented that.
In practice, using "--atomic" shouldn't cause failures, unless you are
trying to delete refs that somebody else is modifying at the same time.
-Peff
prev parent reply other threads:[~2019-06-13 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 17:33 git receive-pack deletes refs one at a time? Nasser Grainawi
2019-06-13 17:43 ` Jeff King
2019-06-13 19:46 ` Nasser Grainawi
2019-06-13 21:20 ` Jeff King [this message]
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=20190613212005.GA1970@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=nasser@codeaurora.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).