From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Matheus Tavares <matheus.bernardino@usp.br>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] t2080: fix cp invocation to copy symlinks instead of following them
Date: Thu, 27 May 2021 14:51:07 +0200 [thread overview]
Message-ID: <87r1hsl4qb.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <5386ee606567248464d39c313ee6177862a1f337.1622071475.git.matheus.bernardino@usp.br>
On Wed, May 26 2021, Matheus Tavares wrote:
> t2080 makes a few copies of a test repository and later performs a
> branch switch on each one of the copies to verify that parallel checkout
> and sequential checkout produce the same results. However, the
> repository is copied with `cp -R` which, on some systems, defaults to
> following symlinks on the directory hierarchy and copying their target
> files instead of copying the symlinks themselves. AIX is one example of
> system where this happens. Because the symlinks are not preserved, the
> copied repositories have paths that do not match what is in the index,
> causing git to abort the checkout operation that we want to test. This
> makes the test fail on these systems.
>
> Fix this by copying the repository with the POSIX flag '-P', which
> forces cp to copy the symlinks instead of following them. Note that we
> already use this flag for other cp invocations in our test suite (see
> t7001). With this change, t2080 now passes on AIX.
>
> Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
> ---
> t/t2080-parallel-checkout-basics.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t2080-parallel-checkout-basics.sh b/t/t2080-parallel-checkout-basics.sh
> index 7087818550..3e0f8c675f 100755
> --- a/t/t2080-parallel-checkout-basics.sh
> +++ b/t/t2080-parallel-checkout-basics.sh
> @@ -114,7 +114,7 @@ do
>
> test_expect_success "$mode checkout" '
> repo=various_$mode &&
> - cp -R various $repo &&
> + cp -R -P various $repo &&
>
> # The just copied files have more recent timestamps than their
> # associated index entries. So refresh the cached timestamps
Thanks for the quick fix, I can confirm that this makes the test pass on
AIX 7.2.
next prev parent reply other threads:[~2021-05-27 12:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 23:58 [PATCH] t2080: fix cp invocation to copy symlinks instead of following them Matheus Tavares
2021-05-27 7:25 ` Christian Couder
2021-05-27 12:51 ` Ævar Arnfjörð Bjarmason [this message]
2021-05-31 14:01 ` Ævar Arnfjörð Bjarmason
2021-05-31 16:09 ` Matheus Tavares
2021-05-31 20:41 ` Ævar Arnfjörð Bjarmason
2021-06-02 1:36 ` Đoàn Trần Công Danh
2021-06-02 10:50 ` Ævar Arnfjörð Bjarmason
2021-06-02 11:14 ` Bagas Sanjaya
2021-06-02 11:22 ` Đoàn Trần Công Danh
2021-06-02 13:36 ` Ævar Arnfjörð Bjarmason
2021-06-02 13:50 ` Đoàn Trần Công Danh
2021-06-03 12:34 ` Đoàn Trần Công Danh
2021-06-02 19:13 ` UTF-BOM was: [PATCH] t2080: fix cp invocation Torsten Bögershausen
2021-06-03 0:07 ` [PATCH] t2080: fix cp invocation to copy symlinks instead of following them brian m. carlson
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=87r1hsl4qb.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=matheus.bernardino@usp.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.