|
|
|
@ -270,8 +270,12 @@ function create_configuration(inputfile; user_config, user_kwargs, type=nothing) |
|
|
|
fallback_edit_commit = "master" |
|
|
|
fallback_edit_commit = "master" |
|
|
|
if (git = Sys.which("git"); git !== nothing) |
|
|
|
if (git = Sys.which("git"); git !== nothing) |
|
|
|
try |
|
|
|
try |
|
|
|
|
|
|
|
env = copy(ENV) |
|
|
|
|
|
|
|
# Set environment variables to block interactive prompt |
|
|
|
|
|
|
|
env["GIT_TERMINAL_PROMPT"] = "0" |
|
|
|
|
|
|
|
env["GIT_SSH_COMMAND"] = get(ENV, "GIT_SSH_COMMAND", "ssh -o \"BatchMode yes\"") |
|
|
|
str = read(pipeline(ignorestatus( |
|
|
|
str = read(pipeline(ignorestatus( |
|
|
|
addenv(`$(git) remote show origin`, ["GIT_TERMINAL_PROMPT=0"]; dir=dirname(inputfile)) |
|
|
|
setenv(`$(git) remote show origin`, env; dir=dirname(inputfile)) |
|
|
|
), stderr=devnull), String) |
|
|
|
), stderr=devnull), String) |
|
|
|
if (m = match(r"^\s*HEAD branch:\s*(.*)$"m, str); m !== nothing) |
|
|
|
if (m = match(r"^\s*HEAD branch:\s*(.*)$"m, str); m !== nothing) |
|
|
|
fallback_edit_commit = String(m[1]) |
|
|
|
fallback_edit_commit = String(m[1]) |
|
|
|
|