From: Andrew Wong <andrew.w@sohovfx.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Noe Rubinstein <nrubinstein@proformatique.com>, git@vger.kernel.org
Subject: Re: [PATCH] rebase -i: fix has_action
Date: Fri, 05 Aug 2011 10:17:42 -0400 [thread overview]
Message-ID: <4E3BFB86.4010408@sohovfx.com> (raw)
In-Reply-To: <7vliv93r9g.fsf@alter.siamese.dyndns.org>
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
next prev parent reply other threads:[~2011-08-05 14:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-04 9:39 [PATCH] rebase -i: fix has_action Noe Rubinstein
2011-08-04 12:15 ` Sverre Rabbelier
2011-08-04 19:34 ` Junio C Hamano
2011-08-05 12:36 ` Sverre Rabbelier
2011-08-05 12:46 ` Johannes Sixt
2011-08-05 16:59 ` Junio C Hamano
2011-08-05 14:17 ` Andrew Wong [this message]
2011-08-05 17:01 ` Junio C Hamano
2011-08-05 14:47 ` What you can throw (on a Friday) Steffen Daode Nurpmeso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E3BFB86.4010408@sohovfx.com \
--to=andrew.w@sohovfx.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nrubinstein@proformatique.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).