git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] tests: factor HOME=$(pwd) in test-lib.sh
Date: Mon, 30 Aug 2010 12:54:20 +0200	[thread overview]
Message-ID: <vpqtymcs74z.fsf@bauges.imag.fr> (raw)
In-Reply-To: <AANLkTi=81oEPHko45Mo2d1qn+qWy-TVLvrFcXaVKd8Lu@mail.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Mon\, 30 Aug 2010 10\:22\:50 +0000")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Mon, Aug 30, 2010 at 09:50, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>> The same pattern is used in many tests, and makes it easy for new ones to
>> rely on $HOME being a trashable, clean, directory.
>
> Looks good, but why not:
>
>> +HOME=$(pwd)
>> +export HOME
>
> This instead:
>
> HOME=$TRASH_DIRECTORY
> export HOME
>
> Looks like it might be more correct given this (always an absolute
> path), but I haven't tested:

That should work too, but with your version, I have to think harder to
make sure $TRASH_DIRECTORY is absolute (that should be OK), and won't
make any issue with symlinks (I have no idea whether it is OK or not),
while it's trivially correct with mine (pwd is absolute, and the -P
option of the cd command right above prevents issue with symlinks).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2010-08-30 10:54 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11  1:04 [PATCH/RFC] Add global and system-wide gitattributes Petr Onderka
2010-08-11  9:20 ` Henrik Grubbström
2010-08-11 10:50   ` Petr Onderka
2010-08-11 12:31 ` Matthieu Moy
2010-08-11 22:19 ` Junio C Hamano
2010-08-16 16:51   ` Petr Onderka
2010-08-16 16:56     ` [PATCH v2] " Petr Onderka
2010-08-25  9:55       ` Štěpán Němec
2010-08-28 17:33         ` Matthieu Moy
2010-08-30  5:34           ` Junio C Hamano
2010-08-30  9:09             ` Štěpán Němec
2010-08-28 18:35       ` Matthieu Moy
2010-08-28 18:41         ` [PATCH] core.attributesfile: a fix, a simplification, and a test Matthieu Moy
2010-08-29 10:32           ` [PATCH v3?] Add global and system-wide gitattributes Štěpán Němec
2010-08-30  8:04             ` Junio C Hamano
2010-08-30  8:26               ` Matthieu Moy
2010-08-30 20:47                 ` Junio C Hamano
2010-08-30 21:11                   ` Junio C Hamano
2010-08-30 22:55                     ` Matthieu Moy
2010-08-30 23:15                       ` [PATCH 1/3 v2] tests: factor HOME=$(pwd) in test-lib.sh Matthieu Moy
2010-08-31  7:42                         ` Ævar Arnfjörð Bjarmason
2010-09-01  7:56                           ` Ævar Arnfjörð Bjarmason
2010-09-01 15:24                             ` Junio C Hamano
2010-09-01 15:40                               ` Ævar Arnfjörð Bjarmason
2010-09-01 16:57                                 ` Matthieu Moy
2010-08-30 23:15                       ` [PATCH 2/3] don't write to git_log_output_encoding outside git_config() Matthieu Moy
2010-09-02  8:56                         ` Matthieu Moy
2010-09-02 15:49                           ` Junio C Hamano
2010-08-30 23:15                       ` [PATCH 3/3 v4] Add global and system-wide gitattributes Matthieu Moy
2010-08-31 22:41                         ` Matthieu Moy
2010-08-31 22:42                           ` [PATCH] " Matthieu Moy
2010-08-31 23:56                           ` [PATCH 3/3 v4] " Junio C Hamano
2010-08-30  9:50               ` [PATCH] tests: factor HOME=$(pwd) in test-lib.sh Matthieu Moy
2010-08-30 10:22                 ` Ævar Arnfjörð Bjarmason
2010-08-30 10:54                   ` Matthieu Moy [this message]
2010-08-30 11:08                     ` Ævar Arnfjörð Bjarmason

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=vpqtymcs74z.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).