summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-06-13 21:36:11 +0530
committerJunio C Hamano <gitster@pobox.com>2013-06-13 15:29:44 -0700
commitdc8ca9123a5b8aa21d8e987875aa2112871f4afa (patch)
tree52d33a6040d95fbbce242702a03e8f52d9855bd3 /git-rebase.sh
parent587947750bd73544a6a99811f0ddfd64e1ff1445 (diff)
downloadgit-dc8ca9123a5b8aa21d8e987875aa2112871f4afa.tar.gz
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>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh2
1 files changed, 2 insertions, 0 deletions
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