git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
From: Max Kirillov <max@max630.net>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: Max Kirillov <max@max630.net>, Git List <git@vger.kernel.org>,
	Eric Sunshine <sunshine@sunshineco.us>
Subject: Re: [PATCH v2] pack-refs: fail on falsely sorted packed-refs
Date: Wed, 13 Feb 2019 06:23:07 +0200
Message-ID: <20190213042307.GA3064@jessie.local> (raw)
In-Reply-To: <CAMy9T_EX_L80-V4zD626nFCxw6qa90+pZwcbd6wHw9ZHcj2rNA@mail.gmail.com>

On Mon, Feb 11, 2019 at 08:24:46PM +0100, Michael Haggerty wrote:
> The change to `write_with_updates()` doesn't only affect `pack-refs`.
> That function is also called when the `packed-refs` file has to be
> rewritten when a packed reference is deleted. This is another thing
> that you could test.

Ok, I'll check ti and add to the tests.

> But that also means that fairly common commands like `git branch -d`
> could be slowed down by this change. I doubt that the slowdown is
> prohibitive, but it would be great to see numbers to prove it. For
> example, create a repository with a lot (say 10000) references, pack
> them, then run `git branch -d` to delete one of them. Benchmark that
> once with master and once with your modification and document the
> difference.

At my hardware, with 1M references, "branch -d" takes 0.31s
of user time before change vs 0.38 after change. Should I
mention it in the commit message?

>> +test_expect_success 'off-order branch not found' '
>> +       test_must_fail git show-ref --verify --quiet refs/heads/b00
>> +'
> 
> I don't think that the above test makes sense. We don't *guarantee*
> that an out-of-order reference won't be found. That is an
> implementation detail that we are free to change. I think that it
> would be OK to just omit this test.

Thanks, will remove this one

  parent reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 23:13 [RFC PATCH] " Max Kirillov
2019-01-30 23:31 ` Eric Sunshine
2019-01-31  8:21   ` Max Kirillov
2019-02-08 21:22   ` [PATCH v2] " Max Kirillov
2019-02-08 21:40     ` Eric Sunshine
2019-02-13  4:24       ` Max Kirillov
     [not found]     ` <CAMy9T_EX_L80-V4zD626nFCxw6qa90+pZwcbd6wHw9ZHcj2rNA@mail.gmail.com>
2019-02-13  4:23       ` Max Kirillov [this message]
2019-02-13 10:08 ` [RFC PATCH] " Ævar Arnfjörð Bjarmason
2019-02-13 10:56   ` SZEDER Gábor
2019-02-23  7:10     ` Max Kirillov
2019-02-14  6:06   ` Jeff King
2019-02-23  7:09   ` Max Kirillov

Reply instructions:

You may reply publically 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190213042307.GA3064@jessie.local \
    --to=max@max630.net \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --cc=sunshine@sunshineco.us \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox