diff options
author | splitDEV <a.rensmann@gmail.com> | 2022-04-24 19:12:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-24 19:12:00 +0200 |
commit | 13afbf6bba61035011dbc47159dbdce8a7110fc8 (patch) | |
tree | 3303c1ccefc8f12aa58e1f36c89719f823e6a570 /src | |
parent | da531c61f6a7353291c215cf855c3e27a718d1fd (diff) |
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 <776816+extrawurst@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/args.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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<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), ); |