rebase: guard against missing files in read_basic_state()

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ramkumar Ramachandra 2013-06-13 21:36:11 +05:30 committed by Junio C Hamano
parent 587947750b
commit dc8ca9123a

View file

@ -84,6 +84,8 @@ keep_empty=
test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t
read_basic_state () {
test -f "$state_dir/head-name" &&
test -f "$state_dir/onto" &&
head_name=$(cat "$state_dir"/head-name) &&
onto=$(cat "$state_dir"/onto) &&
# We always write to orig-head, but interactive rebase used to write to