Re: [PATCHv4] rebase [-i --exec | -ix] <CMD>...

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

 



Johannes Sixt <j6t@xxxxxxxx> writes:

> Am 10.06.2012 12:44, schrieb Lucien Kong:
>> +test_expect_success 'rebase -i --exec without <CMD> shows error message and usage' '
>> +	git reset --hard execute &&
>> +	test_must_fail git rebase -i --exec 2>actual &&
>> +	sed '1d' actual >tmp &&
>> +	mv tmp actual &&
>> +	test_must_fail git rebase -h >expected &&
>> +	test_cmp expected actual &&
>> +	git checkout master
>> +'
>
> IMO, it is more important to check that the error message is present
> rather than whether the usage blurb is correct. But since the error is
> generated by the option parsing machinery, it is probably sufficient to
> check *only* for failure, and don't verify the output at all.
>
> Then change the headline of the text to the neutral
>
> test_expect_success 'rebase -i --exec without <CMD>' '

Makes sense; thanks for a thoughtful suggestion.

> And, BTW, next time I point out that sed 'xy'... should be changed to
> sed -e "xy"... you review *ALL* sed commands you introduce, not just
> those that I point out, OK?
>
> And, BTW, when I point out that ...>expected && sed <expected >expect &&
> mv expect expected should be ...>expect && sed <expect >expected, you
> extrapolate *yourself* that the same pattern applies even if the files
> are named "tmp" and "actual", OK?
>
> That's expected from thoughtful contributors.
>
> -- Hannes
--
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]