Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that fatal error is fine #1335

Merged
merged 2 commits into from
Jun 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Documenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,13 @@ function git_push(
try
run(`git checkout -b $branch upstream/$branch`)
catch e
@info """
Checking out $branch failed, creating a new orphaned branch.
This usually happens when deploying to a repository for the first time and
the $branch branch does not exist yet. The fatal error above is expected output
from Git in this situation.
"""
@debug "checking out $branch failed with error: $e"
@debug "creating a new local $branch branch."
run(`git checkout --orphan $branch`)
run(`git commit --allow-empty -m "Initial empty commit for docs"`)
end
Expand Down