Skip to content

Commit 13afbf6

Browse files
splitDEVextrawurst
andauthored
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]>
1 parent da531c6 commit 13afbf6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
* stack popups ([#846](https://github.com/extrawurst/gitui/issues/846))
2020
* file history log [[@cruessler](https://github.com/cruessler)] ([#381](https://github.com/extrawurst/gitui/issues/381))
2121
* termux support on andriod [[@PeroSar](https://github.com/PeroSar)] ([#1139](https://github.com/extrawurst/gitui/issues/1139))
22+
* use `GIT_DIR` and `GIT_WORK_DIR` from environment if set ([#1191](https://github.com/extrawurst/gitui/pull/1191))
2223
* new [FAQ](./FAQ.md)s page
2324

2425
### Fixed

Diff for: src/args.rs

+2
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ pub fn process_cmdline() -> Result<CliArgs> {
4646
.help("Set the git directory")
4747
.short("d")
4848
.long("directory")
49+
.env("GIT_DIR")
4950
.takes_value(true),
5051
)
5152
.arg(
5253
Arg::with_name("workdir")
5354
.help("Set the working directory")
5455
.short("w")
5556
.long("workdir")
57+
.env("GIT_WORK_TREE")
5658
.takes_value(true),
5759
);
5860

0 commit comments

Comments
 (0)