All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ben Knoble <ben.knoble@gmail.com>
Cc: Phillip Wood <phillip.wood123@gmail.com>,
	 Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	 git@vger.kernel.org,  Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH] sequencer: make it clearer that commit descriptions are just comments
Date: Fri, 16 May 2025 09:21:26 -0700	[thread overview]
Message-ID: <xmqqikm0wmpl.fsf@gitster.g> (raw)
In-Reply-To: <ABFDED43-3AC7-455E-9736-A8D9AC0F3A40@gmail.com> (Ben Knoble's message of "Fri, 16 May 2025 08:04:25 -0400")

Ben Knoble <ben.knoble@gmail.com> writes:

>> Le 15 mai 2025 à 11:56, Junio C Hamano <gitster@pobox.com> a écrit :
>> 
>> Phillip Wood <phillip.wood123@gmail.com> writes:
>> 
>>>> -        grep -v -e \# -e ^$ work >patches &&
>>>> +        sed -e s/#.*// work | grep -v ^$ >patches &&
>>> 
>>> I think we could just use 'sed -n "!/^#/p work >patches &&" here
>> 
>> Or even "sed -e '/^#/d' -e '/^$/d'" ?
>
> I’m probably missing something obvious, but why step away from "grep -v -e ^\# -e ^$"? A one character change from the original ;) If we must go with Sed, I’d prefer Junio’s construct (combining, with obvious semantics via "d") over the sed|grep pipeline. 

Mine was a spinal reflex against piping sed and grep; I do not see a
reason why "grep -v" with two patterns like you gave should not
work---that is a good way to remove the pipe, too.

Thanks.

  parent reply	other threads:[~2025-05-16 16:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-15  2:20 [PATCH] sequencer: make it clearer that commit descriptions are just comments Elijah Newren via GitGitGadget
2025-05-15  4:42 ` Reto
2025-05-15 10:16   ` Phillip Wood
2025-05-15 10:19     ` Phillip Wood
2025-05-15 13:02 ` Phillip Wood
2025-05-15 15:56   ` Junio C Hamano
2025-05-16 12:04     ` Ben Knoble
2025-05-16 15:22       ` Elijah Newren
2025-05-16 16:21       ` Junio C Hamano [this message]
2025-05-15 13:58 ` Junio C Hamano
2025-05-16 16:26 ` [PATCH v2] " Elijah Newren via GitGitGadget

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=xmqqikm0wmpl.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood123@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.