Re: [PATCH 2/2] rebase -i: Preserve whitespace at beginning of commit header in $GIT_EDITOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 10, 2010 at 6:30 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Nazri Ramliy <ayiehere@xxxxxxxxx> 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@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]