Skip to content

[config] Return first writeable backend that isn't worktree by default#32

Merged
VinnyOG merged 1 commit into
mainfrom
pawelczarnecki-fixconfig-CS445675
Mar 22, 2023
Merged

[config] Return first writeable backend that isn't worktree by default#32
VinnyOG merged 1 commit into
mainfrom
pawelczarnecki-fixconfig-CS445675

Conversation

@VinnyOG
Copy link
Copy Markdown

@VinnyOG VinnyOG commented Mar 21, 2023

We added support from worktree config here #31

The original behavior (before that PR) was to return the first writeable backend, which was the repo level config.
The PR change this to return the last, which is the user's global git config ~/.gitconfig when an existing key does not exist.

This caused us to populate that global config file erroneously. This PR restores the original behavior while still returning the first backend to contain the key (and avoid returning the worktree config eagerly).

With this change, I am able to clone multiple repos (which before failed due to origin entry being written to the global config file).

@VinnyOG VinnyOG merged commit 78e8208 into main Mar 22, 2023
@VinnyOG VinnyOG deleted the pawelczarnecki-fixconfig-CS445675 branch March 22, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants