From: Luke Diamand Date: Wed, 11 May 2011 07:50:13 GMT Subject: Re: [PATCH] git-p4: warn if git authorship won't be retained Message-ID: In-Reply-To: <7vhb92i2yu.fsf@alter.siamese.dyndns.org> On Tue, May 10, 2011 at 11:51 PM, Junio C Hamano wrote: > >> + ... >> +     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