git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Carlo Arenas <carenas@gmail.com>
Subject: Re: [PATCH v2] test-lib: set GIT_CEILING_DIRECTORIES to protect the surrounding repository
Date: Wed, 1 Sep 2021 06:58:45 +0200	[thread overview]
Message-ID: <20210901045845.GA76263@szeder.dev> (raw)
In-Reply-To: <87pmttwuaw.fsf@evledraar.gmail.com>

On Tue, Aug 31, 2021 at 04:40:39PM +0200, Ævar Arnfjörð Bjarmason wrote:
> 
> On Sun, Aug 29 2021, SZEDER Gábor wrote:
> 
> > Every once in a while a test somehow manages to escape from its trash
> > directory and modifies the surrounding repository, whether because of
> > a bug in git itself, a bug in a test [1], or e.g. when trying to run
> > tests with a shell that is, in general, unable to run our tests [2].
> >
> > Set GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/.." as an additional
> > safety measure to protect the surrounding repository at least from
> > modifications by git commands executed in the tests (assuming that
> > handling of ceiling directories during repository discovery is not
> > broken, and, of course, it won't save us from regular shell commands,
> > e.g. 'cd .. && rm -f ...').

> For what it's worth I'm very happy with this, and have been running this
> in my own daily build of git, I've occasionally ran into e.g. needing to
> manually clean up my own git.git's config file because some test escaped
> its trash directory.

Thanks, that's a good point.

After a test escapes from its trash directory I routinely check the
content of the work tree and look for stray refs, but it never occured
to me that I should look at the config, too.  And indeed, at the
bottom of .git/config there are two config variables that I don't
remember setting (actually don't even know what they do).


      reply	other threads:[~2021-09-01  4:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28 12:13 [PATCH] test-lib: set GIT_CEILING_DIRECTORIES to protect the surrounding repository SZEDER Gábor
2021-08-28 19:56 ` Carlo Arenas
2021-08-29  9:15   ` SZEDER Gábor
2021-08-29  9:25 ` [PATCH v2] " SZEDER Gábor
2021-08-31 14:40   ` Ævar Arnfjörð Bjarmason
2021-09-01  4:58     ` SZEDER Gábor [this message]

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

  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=20210901045845.GA76263@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=avarab@gmail.com \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).