From: Ramkumar Ramachandra Date: Sun, 12 May 2013 11:56:36 +0000 (+0530) Subject: rebase -i: don't error out if $state_dir already exists X-Git-Tag: v1.8.4.1~1^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1224f3d0f1b47fc640e76b053f25d91e3ca84bcf rebase -i: don't error out if $state_dir already exists In preparation for a later patch that will create $state_dir/autostash in git-rebase.sh before anything else can happen, change a `mkdir $state_dir` call to `mkdir -p $state_dir`. The change is safe, because this is not a test to detect an in-progress rebase (that is already done much earlier in git-rebase.sh). Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 5822b2c592..34111395b5 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -842,7 +842,7 @@ then fi orig_head=$(git rev-parse --verify HEAD) || die "No HEAD?" -mkdir "$state_dir" || die "Could not create temporary $state_dir" +mkdir -p "$state_dir" || die "Could not create temporary $state_dir" : > "$state_dir"/interactive || die "Could not mark as interactive" write_basic_state