git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t6036: avoid "cp -a"

From
Elijah Newren <newren@gmail.com>
Date
Dec 1, 2018, 04:21 UTC
Message-ID
<CABPp-BG0=bGW54eMHCiVMbU3dwccZM06qy2gzqm1CE-TUFZ2zg@mail.gmail.com>
In-Reply-To
<20181201025212.54244-1-carenas@gmail.com>
Hi,
Thanks for the patch!

On Fri, Nov 30, 2018 at 6:52 PM Carlo Marcelo Arenas Belón <carenas@gmail.com> wrote:

>
> b8cd1bb713 ("t6036, t6043: increase code coverage for file collision handling", 2018-11-07) uses this GNU extension that is not available in a POSIX complaint
This is an extraordinarily long line; can you rewrap at around 72 characters?
Show 24 quoted lines
> cp; use cp -R instead
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
> to be applied on top of en/merge-path-collision for next
>
>  t/t6036-recursive-corner-cases.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t6036-recursive-corner-cases.sh b/t/t6036-recursive-corner-cases.sh
> index b7488b00c0..fdb120d0dc 100755
> --- a/t/t6036-recursive-corner-cases.sh
> +++ b/t/t6036-recursive-corner-cases.sh
> @@ -1631,7 +1631,7 @@ test_expect_success 'check nested conflicts' '
>
>                 # Compare m to expected contents
>                 >empty &&
> -               cp -a m_stage_2 expected_final_m &&
> +               cp -R m_stage_2 expected_final_m &&
>                 test_must_fail git merge-file --diff3 \
>                         -L "HEAD"                     \
>                         -L "merged common ancestors"  \
> --
> 2.20.0.rc1.6.ga1598010f

Oops. Thanks for catching. To be honest, we don't even need -a, -R, etc. -- it was just a habit for me to add -a after cp. A simple cp would do, though what you have here is fine too.

Previous: Carlo Marcelo Arenas BelónNext: Junio C Hamano
Message 2 of 4 in “t6036: avoid "cp -a"”
  1. t6036: avoid "cp -a"Carlo Marcelo Arenas Belón, Dec 1, 2018
  2. Elijah NewrenDec 1, 2018
  3. Junio C HamanoDec 1, 2018
  4. Carlo Marcelo Arenas BelónDec 1, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.