public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: "erik elfström" <erik.elfstrom@gmail•com>,
	"Git List" <git@vger•kernel.org>,
	"Jens Lehmann" <Jens.Lehmann@web•de>
Subject: Re: [PATCH v2 3/3] clean: improve performance when removing lots of directories
Date: Fri, 17 Apr 2015 12:13:20 -0700	[thread overview]
Message-ID: <xmqqpp72pnzj.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150417190002.GB32578@peff.net> (Jeff King's message of "Fri, 17 Apr 2015 15:00:02 -0400")

Jeff King <peff@peff•net> writes:

>> Option 1:
>>  Plug the hole in my new is_git_repository function. A quick and dirty
>>  fix that passes the above test would be:
>
> I think that makes sense. It would be nice if you could just call
> read_gitfile, but that function is very anxious to die on error. So the
> prerequisite step would probably be to refactor that into a
> read_gitfile_gently that returns an error code.

I agree.

I was looking at the repository discovery loop to see if it makes
sense to update is-git-directory() to take a gitfile, but I do not
think it is a good idea (typically after is-git-directory() says
"yes", we would append paths e.g. "refs/heads/master" after it to
pass the result to system calls like open()).  I agree that adding
read-gitfile-gently and call it before running is-git-directory
would be a good solution for this change.

> PS Thank you for working on this.

That too.

Thanks.

  reply	other threads:[~2015-04-17 19:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11 16:43 [PATCH v2 0/3] Improving performance of git clean Erik Elfström
2015-04-11 16:43 ` Erik Elfström
2015-04-11 16:43 ` [PATCH v2 1/3] t7300: add tests to document behavior of clean and nested git Erik Elfström
2015-04-11 16:43 ` [PATCH v2 2/3] p7300: add performance tests for clean Erik Elfström
2015-04-11 17:59   ` Thomas Gummerer
2015-04-12 15:31     ` erik elfström
2015-04-12 16:52       ` Thomas Gummerer
2015-04-11 16:43 ` [PATCH v2 3/3] clean: improve performance when removing lots of directories Erik Elfström
2015-04-15 17:56   ` Junio C Hamano
2015-04-17 18:15     ` erik elfström
2015-04-17 19:00       ` Jeff King
2015-04-17 19:13         ` Junio C Hamano [this message]
2015-04-15  3:33 ` [PATCH v2 0/3] Improving performance of git clean Eric Sunshine

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=xmqqpp72pnzj.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=Jens.Lehmann@web$(echo .)de \
    --cc=erik.elfstrom@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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