rebase -i: don't error out if $state_dir already exists
authorRamkumar Ramachandra <artagnon@gmail.com>
Sun, 12 May 2013 11:56:36 +0000 (17:26 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 May 2013 06:20:07 +0000 (23:20 -0700)
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 <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh
index 5822b2c59212fa5bd8dece9261d69e4fbc6a9719..34111395b5faa58e969af4491d649af370ac9979 100644 (file)
@@ -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