Re: rebase [-i --exec | -ix] <CMD>...
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 8, 2012, 15:34 UTC
- Message-ID
- <7vr4tpddgg.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4FD1162C.50405@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 21 quoted lines
> How about this?
>
> {
> first=t
> while read -r insn rest
> do
> case $insn in
> pick)
> test -n "$first" ||
> printf "%s" "$cmd"
> ;;
> esac
> printf "%s %s\n" "$insn" "$rest"
> first=
> done
> printf "%s" "$cmd"
> } <"$1" >"$1.new" &&
> mv "$1.new" "$1"
>
> together with:
> ...This is my favorite version among the ones I've seen so far.