git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Andrew Wong <andrew.w@sohovfx.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Noe Rubinstein <nrubinstein@proformatique.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] rebase -i: fix has_action
Date: Fri, 05 Aug 2011 10:01:03 -0700	[thread overview]
Message-ID: <7v1uwz4wts.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4E3BFB86.4010408@sohovfx.com> (Andrew Wong's message of "Fri, 05 Aug 2011 10:17:42 -0400")

Andrew Wong <andrew.w@sohovfx.com> 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.

  reply	other threads:[~2011-08-05 17:01 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
2011-08-05 17:01     ` Junio C Hamano [this message]
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=7v1uwz4wts.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=andrew.w@sohovfx.com \
    --cc=git@vger.kernel.org \
    --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).