git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: John Keeping <john@keeping.me.uk>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] git config: do not create .git/ if it does not exist yet
Date: Wed, 24 Feb 2016 05:31:52 -0500	[thread overview]
Message-ID: <20160224103152.GA21448@sigill.intra.peff.net> (raw)
In-Reply-To: <20160224101403.GN1766@serenity.lan>

On Wed, Feb 24, 2016 at 10:14:03AM +0000, John Keeping wrote:

> On Wed, Feb 24, 2016 at 03:26:57AM -0500, Jeff King wrote:
> > On Wed, Feb 24, 2016 at 08:47:00AM +0100, Johannes Schindelin wrote:
> > 
> > > 	I cannot think of a way how to test this: all of the regression
> > > 	tests run inside Git's own worktree, and we cannot even assume
> > > 	that /tmp/ is outside of a worktree (or that it exists).
> > 
> > We could make the test conditional on whether we are in a repo. Anybody
> > who builds from a tarball, or who uses --root would then run the test.
> 
> Could we use GIT_CEILING_DIRECTORIES for this?  If it's set to
> TEST_OUTPUT_DIRECTORY won't that cover the in-tree and out-of-tree test
> cases?

Oh, right. That's much less nasty than my suggestion.

> We probably do still want Peff's REPOLESS prereq just in case someone is
> collecting test results in a repository,

We can create arbitrary hierarchies within the trash directory. So even
without removing the trash-dir .git, we could probably do:

  mkdir -p non-repo/foo &&
  (
	cd non-repo &&
	GIT_CEILING_DIRECTORIES=$(pwd) &&
	export GIT_CEILING_DIRECTORIES &&
	cd foo &&
	git config foo.bar baz
  )

or something. That should work everywhere.

> but I think that will see much
> better coverage than relying on people running tests from the tarball.

With mine I think we'd see coverage from git devs, as it works with
--root, too (and if you're not using --root with a RAM disk, I highly
recommend it for the speedup). But your suggestion is way better.

-Peff

  reply	other threads:[~2016-02-24 10:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  7:47 [PATCH] git config: do not create .git/ if it does not exist yet Johannes Schindelin
2016-02-24  8:26 ` Jeff King
2016-02-24 10:14   ` John Keeping
2016-02-24 10:31     ` Jeff King [this message]
2016-02-24 11:31       ` Johannes Schindelin
2016-02-24 12:13         ` Johannes Schindelin
2016-02-24 12:34           ` Jeff King
2016-02-24 18:45           ` Junio C Hamano
2016-02-24 11:01   ` Duy Nguyen
2016-02-24 12:48 ` [PATCH v2] git config: report when trying to modify a non-existing repo config Johannes Schindelin
2016-02-24 12:59   ` Duy Nguyen
2016-02-24 13:26     ` Johannes Schindelin
2016-02-24 13:29       ` Duy Nguyen
2016-02-24 20:11   ` Junio C Hamano
2016-02-24 22:31     ` Junio C Hamano
2016-02-25 15:54       ` Johannes Schindelin

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=20160224103152.GA21448@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=john@keeping.me.uk \
    /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).