Skip to content

Commit dc8ca91

Browse files
artagnongitster
authored andcommitted
rebase: guard against missing files in read_basic_state()
Signed-off-by: Ramkumar Ramachandra <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5879477 commit dc8ca91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-rebase.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ keep_empty=
8484
test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t
8585

8686
read_basic_state () {
87+
test -f "$state_dir/head-name" &&
88+
test -f "$state_dir/onto" &&
8789
head_name=$(cat "$state_dir"/head-name) &&
8890
onto=$(cat "$state_dir"/onto) &&
8991
# We always write to orig-head, but interactive rebase used to write to

0 commit comments

Comments
 (0)