Re: [PATCH 10/12] t/lib-rebase: prepare for testing `git rebase --rebase-merges`

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

 



On 2019-07-25 at 10:11:22, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@xxxxxx>
> 
> The format of the todo list is quite a bit different in the
> `--rebase-merges` mode; Let's prepare the fake editor to handle those
> todo lists properly, too.
> 
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> ---
>  t/lib-rebase.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
> index 7ea30e5006..662a958575 100644
> --- a/t/lib-rebase.sh
> +++ b/t/lib-rebase.sh
> @@ -44,10 +44,10 @@ set_fake_editor () {
>  	rm -f "$1"
>  	echo 'rebase -i script before editing:'
>  	cat "$1".tmp
> -	action=pick
> +	action=\&

So we set action to "&" so we can use it as the result in the sed
expression below…

>  	for line in $FAKE_LINES; do
>  		case $line in
> -		pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d)
> +		pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d|label|l|reset|r|merge|m)
>  			action="$line";;
>  		exec_*|x_*|break|b)
>  			echo "$line" | sed 's/_/ /g' >> "$1";;
> @@ -61,8 +61,8 @@ set_fake_editor () {
>  			echo "$action XXXXXXX False commit" >> "$1"

but then here it doesn't look like "&" is a thing we'd want to use. Is
there something I'm missing about this particular case?
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux