From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com, git@vger.kernel.org, ronniesahlberg@gmail.com,
mhagger@alum.mit.edu, jrnieder@gmail.com
Cc: Stefan Beller <sbeller@google.com>
Subject: [PATCHv2 0/4] refs.c: use transactions for the reflog
Date: Mon, 1 Dec 2014 23:46:38 -0800 [thread overview]
Message-ID: <1417506402-24257-1-git-send-email-sbeller@google.com> (raw)
This is the core part of the refs-transactions-reflog series[1],
which was in discussion for a bit already.
The idea is to have the reflog being part of the transactions, which
the refs are already using, so the we're moving towards a database
like API in the long run. This makes git easier to maintain as well
as opening the possibility to replace the backend with a real database.
The first patch is essentially just some sed magic with reformatting
the code, so the naming convention fits better, because the transactions
will handle both the refs as well as the reflog after this series.
The second patch is also just a rename patch.
The meat and most of the lines of code are found in the 3rd patch.
It was completely rewritten from scratch using ideas provided by
Jonathan, thanks! We'll treat the refs and reflogs a bit differently
within the transaction updates data structure, as the hard part for
the refs is during the commit phase, while the hard part for the reflogs
is during the preparation phase now.
We're using a temporary file for creating the new reflog and rename it
into place afterwards utilizing the lock file API.
The last patch makes actually use of the reflog transaction API.
Any comments would be appreciated,
Thanks,
Stefan
next reply other threads:[~2014-12-02 7:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 7:46 Stefan Beller [this message]
2014-12-02 7:46 ` [PATCH 1/4] refs.c: rename the transaction functions Stefan Beller
2014-12-03 2:24 ` Jonathan Nieder
2014-12-02 7:46 ` [PATCH 2/4] refs.c: rename transaction.updates to transaction.ref_updates Stefan Beller
2014-12-03 2:43 ` Jonathan Nieder
2014-12-02 7:46 ` [PATCH 3/4] refs.c: add a transaction function to append a reflog entry Stefan Beller
2014-12-03 3:15 ` Jonathan Nieder
2014-12-03 22:28 ` Stefan Beller
2014-12-03 22:52 ` Jonathan Nieder
2014-12-02 7:46 ` [PATCH 4/4] reflog.c: use a reflog transaction when writing during expire Stefan Beller
2014-12-03 3:18 ` Jonathan Nieder
2014-12-03 18:05 ` [PATCHv2 0/4] refs.c: use transactions for the reflog Junio C Hamano
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=1417506402-24257-1-git-send-email-sbeller@google.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=mhagger@alum.mit.edu \
--cc=ronniesahlberg@gmail.com \
/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).