threads / patch / 54026

patchrebase: remove unused function reschedule_last_action

Subject: [PATCH] rebase: remove unused function reschedule_last_action

## tl;dr

3 messages between Aug 12, 2020 and Aug 12, 2020. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

René Scharfe· Aug 12, 2020, 13:45 UTC · lore

The only caller of reschedule_last_action was removed by ef64bb328df (rebase: strip unused code in git-rebase--preserve-merges.sh, 2018-05-28); remove this unused shell function as well.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 git-rebase--preserve-merges.sh | 10 ----------
 1 file changed, 10 deletions(-)
Show changes to git-rebase--preserve-merges.sh +0 −11
diff --git a/git-rebase--preserve-merges.sh b/git-rebase--preserve-merges.sh
index dec90e9af67..b9c71d2a71b 100644
--- a/git-rebase--preserve-merges.sh
+++ b/git-rebase--preserve-merges.sh
@@ -193,16 +193,6 @@ mark_action_done () {
 	fi
 }

-# Put the last action marked done at the beginning of the todo list
-# again. If there has not been an action marked done yet, leave the list of
-# items on the todo list unchanged.
-reschedule_last_action () {
-	tail -n 1 "$done" | cat - "$todo" >"$todo".new
-	sed -e \$d <"$done" >"$done".new
-	mv -f "$todo".new "$todo"
-	mv -f "$done".new "$done"
-}
-
 append_todo_help () {
 	gettext "
 Commands:
--
2.28.0
Taylor Blau· Aug 12, 2020, 13:48 UTC · re: René Scharfe · lore

Re: [PATCH] rebase: remove unused function reschedule_last_action

On Wed, Aug 12, 2020 at 03:45:47PM +0200, René Scharfe wrote:
> The only caller of reschedule_last_action was removed by ef64bb328df
> (rebase: strip unused code in git-rebase--preserve-merges.sh,
> 2018-05-28); remove this unused shell function as well.
Easy peasy ;-). Obviously correct, and thanks for cleaning this up.
  Reviewed-by: Taylor Blau <me@ttaylorr.com>
Show 28 quoted lines
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
>  git-rebase--preserve-merges.sh | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/git-rebase--preserve-merges.sh b/git-rebase--preserve-merges.sh
> index dec90e9af67..b9c71d2a71b 100644
> --- a/git-rebase--preserve-merges.sh
> +++ b/git-rebase--preserve-merges.sh
> @@ -193,16 +193,6 @@ mark_action_done () {
>  	fi
>  }
>
> -# Put the last action marked done at the beginning of the todo list
> -# again. If there has not been an action marked done yet, leave the list of
> -# items on the todo list unchanged.
> -reschedule_last_action () {
> -	tail -n 1 "$done" | cat - "$todo" >"$todo".new
> -	sed -e \$d <"$done" >"$done".new
> -	mv -f "$todo".new "$todo"
> -	mv -f "$done".new "$done"
> -}
> -
>  append_todo_help () {
>  	gettext "
>  Commands:
> --
> 2.28.0

Thanks, Taylor

Junio C Hamano· Aug 12, 2020, 19:25 UTC · re: Taylor Blau · lore

Re: [PATCH] rebase: remove unused function reschedule_last_action

Taylor Blau <me@ttaylorr.com> writes:
Show 10 quoted lines
> On Wed, Aug 12, 2020 at 03:45:47PM +0200, René Scharfe wrote:
>> The only caller of reschedule_last_action was removed by ef64bb328df
>> (rebase: strip unused code in git-rebase--preserve-merges.sh,
>> 2018-05-28); remove this unused shell function as well.
>
> Easy peasy ;-). Obviously correct, and thanks for cleaning this up.
>
>   Reviewed-by: Taylor Blau <me@ttaylorr.com>
>
>> Signed-off-by: René Scharfe <l.s.r@web.de>

I thought preserve-merges backend is on its way out, but I do not have objection to have some part of it retire earlier than the remainder of it ;-)

Will queue.  Thanks.
Show 30 quoted lines
>> ---
>>  git-rebase--preserve-merges.sh | 10 ----------
>>  1 file changed, 10 deletions(-)
>>
>> diff --git a/git-rebase--preserve-merges.sh b/git-rebase--preserve-merges.sh
>> index dec90e9af67..b9c71d2a71b 100644
>> --- a/git-rebase--preserve-merges.sh
>> +++ b/git-rebase--preserve-merges.sh
>> @@ -193,16 +193,6 @@ mark_action_done () {
>>  	fi
>>  }
>>
>> -# Put the last action marked done at the beginning of the todo list
>> -# again. If there has not been an action marked done yet, leave the list of
>> -# items on the todo list unchanged.
>> -reschedule_last_action () {
>> -	tail -n 1 "$done" | cat - "$todo" >"$todo".new
>> -	sed -e \$d <"$done" >"$done".new
>> -	mv -f "$todo".new "$todo"
>> -	mv -f "$done".new "$done"
>> -}
>> -
>>  append_todo_help () {
>>  	gettext "
>>  Commands:
>> --
>> 2.28.0
>
> Thanks,
> Taylor

← back to recent threads