Byron / gitoxide

An idiomatic, lean, fast & safe pure Rust implementation of Git
Apache License 2.0
8.84k stars 301 forks source link

Unset other env vars related to `GIT_DIR` for fixtures #1581

Closed EliahKagan closed 3 weeks ago

EliahKagan commented 3 weeks ago

This removes other environment variables that have an effect conceptually related to GIT_DIR even when GIT_DIR is not set. Most of them change where git will look for files that are ordinarily in a repository's .git directory. In contrast, GIT_WORK_TREE changes where the working tree is found.

Significant further details are in the commit message, in case they are of interest now or in the future. I did not add tests because the likelihood that there is a mistake here that new tests would find is low, and because tests that go beyond effectively repeating the changes to the code under test would effectively run into the concerns described in #1577 or #1578.

EliahKagan commented 3 weeks ago

I've noticed this PR has been open for a while since being approved. Was auto-merge intended to have picked it up?

Byron commented 3 weeks ago

Strange, I completely missed this one (and your message) :/.

EliahKagan commented 3 weeks ago

This could happen if you accidentally unsubscribed from notifications on this PR specifically, which I have found is easy to do on the Android app. But that wouldn't have an effect on auto-merge. All pushes here (including force pushes) substantially preceded the approving review, so I don't know what would cause that. But it may be that I am misunderstanding the circumstances required for auto-merge to take effect.