From: Nazri Ramliy <ayiehere@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de
Subject: Re: [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header in $GIT_EDITOR
Date: Sat, 10 Jul 2010 20:22:41 +0800 [thread overview]
Message-ID: <AANLkTim2cOWWYbco3XYb_dfOCkUp4rfXIvE-8jZWK4a8@mail.gmail.com> (raw)
In-Reply-To: <7vpqywl1sb.fsf@alter.siamese.dyndns.org>
On Sat, Jul 10, 2010 at 6:30 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Nazri Ramliy <ayiehere@gmail.com> writes:
>
>> + sed -i "s/^\([a-z]\+\) [0-9a-f]\+ /\1 $REPLACE_COMMIT_ID /" \
>
> This is not portable. Escaping an ERE element with a backslash does not
> make it suitable for use in BRE that sed uses.
>
> Do we use in-place replacement anywhere else with sed? I don't think it
> is portable, either.
>
And later ...
On Sat, Jul 10, 2010 at 6:37 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> + cat "$TODO.tmp" | sed "s/^/pick /" > "$TODO"
>
> Do not cat a single file into a pipeline.
>
> sed "s/^/pick /" <"$TODO.tmp" >"$TODO"
>
>> + else
>> + cat "$TODO.tmp" |
>
> Likewise.
>
[snip]
> Don't pipe output of grep into sed.
>
> sed -ne "/^$shortsha1 /s/^/pick /p" <"$TODO.tmp" >>"$TODO"
I'll send out a v2 of this series that addresses the above issues in
better ways (i think).
nazri
next prev parent reply other threads:[~2010-07-10 12:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-09 5:20 [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of non-comment lines in $GIT_EDITOR Nazri Ramliy
2010-07-09 5:20 ` [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header " Nazri Ramliy
2010-07-09 22:37 ` Junio C Hamano
2010-07-10 12:22 ` Nazri Ramliy [this message]
2010-07-09 22:30 ` [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of non-comment lines " Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2010-07-10 12:27 [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of commit header(s) " Nazri Ramliy
2010-07-10 12:27 ` [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header " Nazri Ramliy
2010-07-10 16:35 ` Nazri Ramliy
2010-07-12 6:05 ` Junio C Hamano
2010-07-13 1:46 ` Nazri Ramliy
2010-07-13 5:06 ` Junio C Hamano
2010-07-13 5:19 ` Nazri Ramliy
2010-07-12 1:04 [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of commit header(s) " Nazri Ramliy
2010-07-12 1:04 ` [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header " Nazri Ramliy
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=AANLkTim2cOWWYbco3XYb_dfOCkUp4rfXIvE-8jZWK4a8@mail.gmail.com \
--to=ayiehere@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/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).