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

Re: [PATCH] git-p4: warn if git authorship won't be retained

From
Luke Diamand <luke@diamand.org>
Date
May 11, 2011, 07:50 UTC
Message-ID
<BANLkTinn5E29gLr89srxypEx9aauiL4h7Q@mail.gmail.com>
In-Reply-To
<7vhb92i2yu.fsf@alter.siamese.dyndns.org>
On Tue, May 10, 2011 at 11:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
<snip>
Show 20 quoted lines
>
>> + ...
>> +     p4_check_commit_author usernamefile3 alice &&
>> +     cd "$TRASH_DIRECTORY" &&
>> +     rm -rf "$git" && mkdir "$git"
>> +'
>
> When the commands in the && chain fails after 'cd "$git"' near the top but
> not before 'cd "$TRASH_DIRECTORY"' near the end, you would end up starting
> the next test from somewhere different from "$TRASH_DIRECTORY".
>
> Do it like this instead:
>
>        "$GITP4" clone --dest="$git" //depot &&
>        (
>                cd "$git" &&
>                ...
>        ) &&
>        rm -fr "$git"
>
Thanks - that might explain a few oddities I had when testing.

There's a few others of those in the earlier tests; I'll resend this patch, and send a second patch to fix those if that's ok.

Regards! Luke

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “git-p4: warn if git authorship won't be retained”
  1. git-p4: warn if git authorship won't be retainedLuke Diamand, May 10, 2011
  2. git-p4: warn if git authorship won't be retainedLuke Diamand, May 10, 2011
  3. Luke DiamandMay 10, 2011
  4. Junio C HamanoMay 10, 2011
  5. Luke DiamandMay 11, 2011
  6. Junio C HamanoMay 10, 2011

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.