Browse Source

Disable git terminal prompt when detecting remote HEAD branch.

pull/194/head
Fredrik Ekre 4 years ago
parent
commit
696b13a436
  1. 3
      CHANGELOG.md
  2. 2
      src/Literate.jl

3
CHANGELOG.md

@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Fixed
- Disable git terminal prompt when detecting remote HEAD branch. ([#194][github-194])
## [2.13.0] - 2022-02-18 ## [2.13.0] - 2022-02-18
### Changed ### Changed
@ -196,6 +198,7 @@ https://discourse.julialang.org/t/ann-literate-jl/10651 for release announcement
[github-187]: https://github.com/fredrikekre/Literate.jl/pull/187 [github-187]: https://github.com/fredrikekre/Literate.jl/pull/187
[github-188]: https://github.com/fredrikekre/Literate.jl/pull/188 [github-188]: https://github.com/fredrikekre/Literate.jl/pull/188
[github-190]: https://github.com/fredrikekre/Literate.jl/pull/190 [github-190]: https://github.com/fredrikekre/Literate.jl/pull/190
[github-194]: https://github.com/fredrikekre/Literate.jl/pull/194
[Unreleased]: https://github.com/fredrikekre/Literate.jl/compare/v2.13.0...HEAD [Unreleased]: https://github.com/fredrikekre/Literate.jl/compare/v2.13.0...HEAD
[2.13.0]: https://github.com/fredrikekre/Literate.jl/compare/v2.12.1...v2.13.0 [2.13.0]: https://github.com/fredrikekre/Literate.jl/compare/v2.12.1...v2.13.0

2
src/Literate.jl

@ -271,7 +271,7 @@ function create_configuration(inputfile; user_config, user_kwargs, type=nothing)
if (git = Sys.which("git"); git !== nothing) if (git = Sys.which("git"); git !== nothing)
try try
str = read(pipeline(ignorestatus( str = read(pipeline(ignorestatus(
setenv(`$(git) remote show origin`; dir=dirname(inputfile)) setenv(`$(git) remote show origin`, ["GIT_TERMINAL_PROMPT=0"]; 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])

Loading…
Cancel
Save