| Age | Commit message (Collapse) | Author |
|
That was the intention all along.
|
|
|
|
Replace the variable `magit--display-core-upgrade-instructions',
making it easier to use this for more than one dependency.
|
|
That library requires `magit-section', which performs the extended
version of this kludge.
|
|
It appears that for some users `static-if' expands to nothing if
the THEN or ELSE part is a `defalias' form (whichever is used in
their case). I got similar reports when using `static-if' like
this in other packages, but I was never able to reproduce these
issues.
Workaround this by placing the `static-if' inside the `defalias'.
Another workaround, which appears to work, would be to wrap both
THEN and ELSE with `progn'.
Closes #5557.
|
|
`dabbrev-capf' does not call `user-error'; in actuality it merely
includes in its return value a function, which calls `user-error'.
That function is what needs to be advised to neuter that incorrect
use of `user-error'.
Also use `condition-case' instead of `cl-letf'.
Closes #5559.
Suggested-by: Stefan Monnier <monnier@iro.umontreal.ca>
|
|
Only augment the predicate if there actually is one.
Fix problem introduced in d527f833.
|
|
|
|
|
|
The new `magit--meta-hunk-p' is a kludge, instead we should
define proper types for these "not-quite-a-hunk" sections.
Closes #5554.
|
|
Closes #5556.
|
|
Disable not only `read-only-mode' but also `magit-blob-mode'
because the latter shadows bindings for `self-insert-command'.
Closes #5553.
|
|
Do this so we can remap `read-only-mode' to `magit-blob-mode' when the
latter is enabled, to disable both modes together. The latter shadows
bindings for `self-insert-command'.
|
|
Only make blob-visiting buffers read-only when they are first visited.
Previously `buffer-read-only' was set to t whenever such a buffer was
reverted (via `magit--blob-normal-mode').
Additionally set `read-only-mode--state' to the same value; otherwise
`revert-buffer' would not actually restore `buffer-read-only' (via
`revert-buffer-restore-read-only' on `revert-buffer-restore-functions').
Set `read-only-mode--state' manually because calling `read-only-mode'
does not only set these two variables, it could also enable `view-mode',
which would shadow all the bindings in `magit-blob-mode-map'.
Beside `magit-find-file-noselect', `magit-ediff-stage' also has to set
both variables if it needs to make the buffer temporarily editable.
|
|
The former is better at taking ignore rules into account.
Remove the recently added `magit--untracked-files', which also used
the former. The new `magit-untracked-files' is essentially the same
as that short-lived function, but preserves its own function signature.
|
|
Never limit the list of files to those in `default-directory' and
always return paths relative to the top-level. This affects other
`magit-*-files' functions and their callers.
Some callers of these functions explicitly used `magit-with-toplevel'
and we can stop doing that now. Other callers did not use that macro
but should have done so. Among those, many were always called from the
top-level, so this bug was theoretical in those cases. Others are more
likely to be called from a subdirectory. There are no callers that
actually need just the files from a subdirectory.
|
|
That is cheaper than `magit-with-toplevel'.
|
|
Two definitions have to be moved.
|
|
|
|
|
|
Our wrapper function backports a bugfix from debbug#80645 /
a7d05207214. It isn't needed for recent 31.0.50 builds.
Closes #5551.
|
|
Predicates are evaluate with the minibuffer as the current buffer.
Unlike for other completion frameworks, Helm does not ensure that
the value of `default-directory' in that buffer is the same as in
the buffer from which completion was invoked, making it necessary
to explicitly reinforce the expected value.
Closes #5546.
|
|
|
|
In [1: 7fe84a4cd0] we started using the new `magit--early-process-lines'
but that did not take into account that `string-match-p' may end up with
nil as STRING, which is a type error.
Closes #5548.
|
|
|
|
|
|
If non-nil, return paths relative to DIRECTORY, because the caller is
going to insert the selected path into "DIRECTORY/.gitignore".
|
|
This is a potential replacement for `magit-untracked-files', but
actually replacing that requires more work.
|
|
|
|
That was only used in an edge-case and even then it made little sense.
Instead add a DIRECTORY and make `magit-gitignore-in-subdir' pass the
selected subdirectory. The intention is to limit the patterns to that
directory, but that does not work yet because there is more weirdness
in `magit--gitignore-patterns'.
|
|
|
|
|
|
|
|
|
|
`magit-diff--modified-defuns' looks for a diff in the current buffer,
but if "git commit" was called without "--verbose" then there is none.
It also only support plain diffs, not the magit-section representation.
This new function uses the in-buffer diff if any, else it inserts the
diff into a temporary buffer and uses that.
|
|
Split up `magit-commit-diff-1'.
|
|
|
|
|
|
I.e., support visiting a blob via its blob oid without
knowing a commit and tree path in which it can be found.
|
|
Previously an error was signaled when the index was locked by another
process, preventing whatever action would have happened after the
creation of the wip commit. Now we skip creating this wip commit and
show a warning. This effectively suspends the creation of worktree
wip commits.
This issue can be reproduced by initiating but not finishing a commit,
editing but not saving a tracked file, and then refreshing a Magit
buffer.
|
|
|
|
|
|
When using a package such as `company', which automatically performs
completion, it isn't guaranteed that `dabbrev--reset-global-variables'
has been called at least once, resulting in type error. So we have to
take care of the initialization.
Closes #5545.
|
|
|
|
Usually I only use anaphoric forms only for short bodies, but
in these cases the previously used symbol `s' wasn't any more
descriptive than `$'.
|
|
|
|
|
|
This is displayed in a plaintext textarea.
|
|
|
|
Closes #5544.
|