Thread (4 messages) flat view 4 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 1/3] rebase: guard against missing files in read_basic_state()

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:57:44
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Ramkumar Ramachandra <redacted>
---
 git-rebase.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/git-rebase.sh b/git-rebase.sh
index d0c11a9..2122fe0 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
-- 
1.8.3.1.381.gf08dd97.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help