From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
Eric Sunshine <sunshine@sunshineco.com>,
git@vger.kernel.org, Michael Haggerty <mhagger@alum.mit.edu>
Subject: [PATCH v2 0/2] Avoid rewriting "packed-refs" unnecessarily
Date: Sat, 28 Oct 2017 11:16:00 +0200 [thread overview]
Message-ID: <cover.1509181545.git.mhagger@alum.mit.edu> (raw)
This reroll make some logically small changes to v1 [1] that are
textually very big:
* Invert the sense of `is_packed_transaction_noop()` and rename it to
`is_packed_transaction_needed()`. This makes the logic easier to
follow and document.
* Add a big comment to that function, describing the cases when it
returns false positives and explaining why that isn't a problem.
* In the commit message for patch 02, gives a lot more information
about the regression that it is fixing. Thanks to Eric for the
suggestion.
These patches are also available as branch
`avoid-rewriting-packed-refs` on my GitHub fork [2]. They now use
`mh/packed-ref-transactions` as the base, since that is where Junio
chose to apply v1.
Michael
[1] https://public-inbox.org/git/cover.1508924577.git.mhagger@alum.mit.edu/
[2] https://github.com/mhagger/git
Michael Haggerty (2):
t1409: check that `packed-refs` is not rewritten unnecessarily
files-backend: don't rewrite the `packed-refs` file unnecessarily
refs/files-backend.c | 18 ++++++-
refs/packed-backend.c | 94 +++++++++++++++++++++++++++++++++
refs/packed-backend.h | 9 ++++
t/t1409-avoid-packing-refs.sh | 118 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 238 insertions(+), 1 deletion(-)
create mode 100755 t/t1409-avoid-packing-refs.sh
--
2.14.1
next reply other threads:[~2017-10-28 9:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-28 9:16 Michael Haggerty [this message]
2017-10-28 9:16 ` [PATCH v2 1/2] t1409: check that `packed-refs` is not rewritten unnecessarily Michael Haggerty
2017-10-28 9:16 ` [PATCH v2 2/2] files-backend: don't rewrite the `packed-refs` file unnecessarily Michael Haggerty
2017-10-30 4:52 ` Junio C Hamano
2017-11-01 7:34 ` [PATCH v2 0/2] Avoid rewriting "packed-refs" unnecessarily Jeff King
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=cover.1509181545.git.mhagger@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.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).