Unverified Commit ec891eaa authored by Mark Vander Stel's avatar Mark Vander Stel
Browse files

Fix fossil 1.11+ matching any dir as repo

Fossil 1.11 changed the behavior of 'fossil info' to always succeed even
if not in a repo (just giving basic global config details). This broke
how we used it, to tell if we were in a repo.
Replacing with 'fossil status' gives the same functionality.

I should have caught this myself as I am working with fossil for the
rework, but I accidentally fixed this by using the fossil 1.7+ command
'fossil branch current'. This will work until the rework is done.

Fixes #626
parent deff598f
......@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.12.1] - 2020-10-25
### Fixed
- **fossil**: fossil 1.11+ maching any directory as a valid repo and printing
3 error messages ([#626])
## [1.12.0] - 2020-07-17
### Added
- **color**: Add `$MAGENTA`, `$BOLD_PURPLE`, and `$BOLD_MAGENTA` ([3fadce9])
......@@ -318,6 +323,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#613]: https://github.com/nojhan/liquidprompt/issues/613
[#614]: https://github.com/nojhan/liquidprompt/issues/614
[#615]: https://github.com/nojhan/liquidprompt/issues/615
[#626]: https://github.com/nojhan/liquidprompt/issues/626
[0234a58]: https://github.com/nojhan/liquidprompt/commit/0234a581d023fb6c40e5339f6dcbd619a33b4553
[02bc49e]: https://github.com/nojhan/liquidprompt/commit/02bc49edf306749c47d7a389dc916cb68e992cc8
......
......@@ -190,3 +190,4 @@ Thanks again to everyone for all of the help and support!
* Gergo Szonyi (@gex)
* Nolan Leake (@nolanl)
* Éloi Rivard (@azmeuk)
* Felix Eckhofer (@tribut)
......@@ -1108,7 +1108,7 @@ _lp_fossil_branch()
branch=$(fossil branch list 2>/dev/null | sed -n -$_LP_SED_EXTENDED 's/^\*\s+(\w*)$/\1/p')
if [[ -n "$branch" ]]; then
echo -nE "$branch"
elif fossil info &>/dev/null ; then
elif fossil status &>/dev/null ; then
echo -n "no-branch"
fi
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment