Re: [PATCH] rebase -i: fix has_action

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

 



Andrew Wong <andrew.w@xxxxxxxxxxx> writes:

> On 08/04/2011 03:34 PM, Junio C Hamano wrote:
>> How about removing the unnecessary negation from the logic and directly
>> ask what we really want to know?
>>
>> That is, "Do we have a line that is _not_ comment?"
>>
>> 	has_action () {
>>           sane_grep -v -e '^#' -e '^[   ]*$' "$1" >/dev/null
>> 	}
> How about also including comments that begins with spaces? i.e.

Not interested.

It would be _clear_ if you inserted extra space before '#'; Noe's issue is
that it is not clear if you have extra space on a blank line, which I am a
bit more sympathetic.

--
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]