From dc8ca9123a5b8aa21d8e987875aa2112871f4afa Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Thu, 13 Jun 2013 21:36:11 +0530 Subject: rebase: guard against missing files in read_basic_state() Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- git-rebase.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-rebase.sh b/git-rebase.sh index d0c11a910a..2122fe030e 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -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 -- cgit v1.2.3