Re: [PATCH 1/3] t4150-am: refactor and clean common setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 28, 2015 at 3:09 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> On Tue, May 26, 2015 at 5:32 PM, Remi Lespinet
> <remi.lespinet@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>> +setup_temporary_branch () {
>> +       tmp_name=${2-"temporary"}

I forgot to mention the broken &&-chain here. Although the missing &&
doesn't actively hurt the function today, someone may someday insert
code above the 'tmp_name=' line without noticing the lack of &&, and
the test won't notice a failure in that newly added code. Thus, it's
better to keep the &&-chain intact throughout.

>> +       git reset --hard &&
>> +       rm -fr .git/rebase-apply &&
>> +       test_when_finished "git checkout $1 && git branch -D $tmp_name" &&
>> +       git checkout -b "$tmp_name" "$1"
>> +}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]