From: Ramkumar Ramachandra Date: Thu, 13 Jun 2013 16:06:11 +0000 (+0530) Subject: rebase: guard against missing files in read_basic_state() X-Git-Tag: v1.8.4-rc0~149^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=dc8ca9123a5b8aa21d8e987875aa2112871f4afa;p=git-core%2Fgit.git rebase: guard against missing files in read_basic_state() Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- diff --git a/git-rebase.sh b/git-rebase.sh index d0c11a910..2122fe030 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