git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase -i: fix has_action

From
AWAndrew Wong <andrew.w@sohovfx.com>
Date
Aug 5, 2011, 14:17 UTC
Message-ID
<4E3BFB86.4010408@sohovfx.com>
In-Reply-To
<7vliv93r9g.fsf@alter.siamese.dyndns.org>
On 08/04/2011 03:34 PM, Junio C Hamano wrote:
Show 8 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “rebase -i: fix has_action”
  1. rebase -i: fix has_actionNoe Rubinstein, Aug 4, 2011
  2. Sverre RabbelierAug 4, 2011
  3. Junio C HamanoAug 4, 2011
  4. Sverre RabbelierAug 5, 2011
  5. Johannes SixtAug 5, 2011
  6. Junio C HamanoAug 5, 2011
  7. Andrew WongAug 5, 2011
  8. Junio C HamanoAug 5, 2011
  9. What you can throw (on a Friday)Steffen Daode Nurpmeso, Aug 5, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.