diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aeb3d58..a37b8caa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/args.rs b/src/args.rs index 6d2df0d8..cf5587ee 100644 --- a/src/args.rs +++ b/src/args.rs @@ -46,6 +46,7 @@ pub fn process_cmdline() -> Result { .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 { .help("Set the working directory") .short("w") .long("workdir") + .env("GIT_WORK_TREE") .takes_value(true), );