Subject: Re: [PATCH] rebase -i: fix has_action

From: Andrew Wong <[email-masked]>
Date: Fri, 05 Aug 2011 10:17:42 -0400

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.

    has_action () {
        sane_grep -v -e '^[   ]*#' -e '^[   ]*$' "$1" >/dev/null
    }

Also, is [   ] supposed to be a space and a hard tab? They just seem to
be three spaces in my email. We might need to watch out for the hard tab
getting expanded into spaces somewhere during the email process,
especially when applying the patch from email into code.

Andrew