Re: rebase [-i --exec | -ix] <CMD>...

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

 



Johannes Sixt <j6t@xxxxxxxx> writes:

> 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.
--
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]