Add support for GIT_DIR and GIT_WORK_TREE environment variables (#1191)

* Use git env variables for git dir and git workdir

* Add changes to CHANGELOG.md

* Fix indentation

* Add link to PR

Co-authored-by: Stephan D <[email protected]>
This commit is contained in:
splitDEV
2022-04-24 19:12:00 +02:00
committed by GitHub
co-authored by Stephan D
parent da531c61f6
commit 13afbf6bba
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* stack popups ([#846](https://github.com/extrawurst/gitui/issues/846))
* file history log [[@cruessler](https://github.com/cruessler)] ([#381](https://github.com/extrawurst/gitui/issues/381))
* termux support on andriod [[@PeroSar](https://github.com/PeroSar)] ([#1139](https://github.com/extrawurst/gitui/issues/1139))
* use `GIT_DIR` and `GIT_WORK_DIR` from environment if set ([#1191](https://github.com/extrawurst/gitui/pull/1191))
* new [FAQ](./FAQ.md)s page
### Fixed
+2
View File
@@ -46,6 +46,7 @@ pub fn process_cmdline() -> Result<CliArgs> {
.help("Set the git directory")
.short("d")
.long("directory")
.env("GIT_DIR")
.takes_value(true),
)
.arg(
@@ -53,6 +54,7 @@ pub fn process_cmdline() -> Result<CliArgs> {
.help("Set the working directory")
.short("w")
.long("workdir")
.env("GIT_WORK_TREE")
.takes_value(true),
);