rebase: guard against missing files in read_basic_state()
authorRamkumar Ramachandra <artagnon@gmail.com>
Thu, 13 Jun 2013 16:06:11 +0000 (21:36 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jun 2013 22:29:44 +0000 (15:29 -0700)
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh
index d0c11a910a69603ac19c83a5d29af9f32f780267..2122fe030e55ac047c514822e0156911b54a05b0 100755 (executable)
@@ -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