Skip to content

Commit 1d1477a

Browse files
committed
git/rebase: fix todo list when stopping for user interaction
Print the items in a loop so they don't get merged into the same line. Write the new todo list, even if there was no failure (for example with edit or break commands in interactive mode).
1 parent 55509dc commit 1d1477a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rebase

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ todo=`$nl{cat .git/rebase.todo}
4646
4747
fn sigexit {
4848
s=$status
49-
if(!){
50-
echo $todo > .git/rebase.todo
49+
if(!)
5150
echo 'fix and git/rebase -r'
52-
}
51+
>.git/rebase.todo for(i in $todo)
52+
echo $i
5353
status=$s
5454
}
5555
@@ -86,6 +86,7 @@ while(! ~ $#todo 0){
8686
}
8787
}
8888
89+
fn sigexit
8990
git/branch -nb $tmp $src
9091
git/branch -d $tmp
9192
rm .git/rebase.todo .git/rebase.src

0 commit comments

Comments
 (0)