diff options
| author | Kyle Meyer <kyle@kyleam.com> | 2021-04-04 17:50:54 -0400 |
|---|---|---|
| committer | Kyle Meyer <kyle@kyleam.com> | 2021-04-06 00:50:01 -0400 |
| commit | 99291801afa25ef015dbc8635594ff58b30b246b (patch) | |
| tree | 58bbd46a1bd9f40adcc763c7f0f9b3a3cb2ef137 /Documentation | |
| parent | 1cc2275e91c2c0f009ff25a643129f72d54f8b85 (diff) | |
Propagate git failures that are due to corrupt configuration
magit-toplevel uses a failing `git rev-parse --show-toplevel' to
decide that it's not in a working tree. In case of corrupt Git
configuration, it will incorrectly conclude that it's not in a
repository and won't propagate the error to the user. These two
failures can't be distinguished by exit code. We can check for a
corrupt configuration with a follow-up git-config call, but it's
probably not worth doing that within the heavily used magit-toplevel.
Instead do it as part of the existing
magit--not-inside-repository-error handling as well as when an
interactive call to magit-status doesn't find a repository. This
covers magit-status, magit-status-setup-buffer, and
magit-get-mode-buffer, so it should ensure that the error is relayed
to the caller.
Closes #4337.
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/RelNotes/3.0.0.org | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/RelNotes/3.0.0.org b/Documentation/RelNotes/3.0.0.org index b4e4dd1..37d72ef 100644 --- a/Documentation/RelNotes/3.0.0.org +++ b/Documentation/RelNotes/3.0.0.org @@ -480,6 +480,10 @@ - ~magit-abbrev-length~ returned an incorrect result when ~core.abbrev~ was explicitly set to "auto". +- Calling ~magit-status~ in a repository with a corrupt Git + configuration didn't propagate the error and instead preseted the + directory as though it was uninitialized. #4337 + - Various bug fixes to ~magit-branch-delete~ (3e73ff19d), ~magit--{upstream,pushbranch}-suffix-predicate~ (0ce7fbbc2), |
