[PATCH 2/7] rebase -i: don't error out if $state_dir already exists
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- May 12, 2013, 11:56 UTC
- Message-ID
- <1368359801-28121-3-git-send-email-artagnon@gmail.com>
- In-Reply-To
- <1368359801-28121-1-git-send-email-artagnon@gmail.com>
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> --- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 5822b2c..3411139 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
-- 1.8.3.rc1.51.gd7a04de