aboutsummaryrefslogtreecommitdiff
path: root/lisp
AgeCommit message (Collapse)Author
2026-04-26magit-blame-mode: Set magit-blame--make-margin-overlays to booleanHEADmainJonas Bernoulli
That was the intention all along.
2026-04-23Add kludge to verify that a recent transient is loadedJonas Bernoulli
2026-04-23magit--display-core-upgrade-instructions: New functionJonas Bernoulli
Replace the variable `magit--display-core-upgrade-instructions', making it easier to use this for more than one dependency.
2026-04-23Remove redundant seq version verification kludge from magit-base.elJonas Bernoulli
That library requires `magit-section', which performs the extended version of this kludge.
2026-04-22Add kludge for mystery issue involving static-ifJonas Bernoulli
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.
2026-04-16Properly implement dabbrev-capf bugfix backportJonas Bernoulli
`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>
2026-04-16magit-read-module-path: Fix previous changePedro Ribeiro Mendes JĂșnior
Only augment the predicate if there actually is one. Fix problem introduced in d527f833.
2026-04-11Do not attempt to fontify and refine metadata hunksJonas Bernoulli
The new `magit--meta-hunk-p' is a kludge, instead we should define proper types for these "not-quite-a-hunk" sections. Closes #5554.
2026-04-11Backport dabbrev-capf bugfix permanentlyJonas Bernoulli
Closes #5556.
2026-04-09magit-ediff-stage: Suspend magit-blob-modeJonas Bernoulli
Disable not only `read-only-mode' but also `magit-blob-mode' because the latter shadows bindings for `self-insert-command'. Closes #5553.
2026-04-09magit-blob-mode: Also toggle buffer-read-only accordinglyJonas Bernoulli
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'.
2026-04-09Preserve read-only-mode in blob-visiting buffersJonas Bernoulli
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.
2026-04-08magit-untracked-files: Use git-status instead of git-ls-filesJonas Bernoulli
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.
2026-04-08magit-list-files: Never limit to subdirectoryJonas Bernoulli
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.
2026-04-08magit-revision-{files,directories}: Use --full-treeJonas Bernoulli
That is cheaper than `magit-with-toplevel'.
2026-04-08magit-git.el: Split up Files sectionJonas Bernoulli
Two definitions have to be moved.
2026-04-08magit--git-w32-path-hack: Renamed variableJonas Bernoulli
2026-04-08magit-cygwin-mount-points: Move definitionJonas Bernoulli
2026-04-06git-commit-setup-capf: Work around bug in dabbrev-capfJonas Bernoulli
Our wrapper function backports a bugfix from debbug#80645 / a7d05207214. It isn't needed for recent 31.0.50 builds. Closes #5551.
2026-04-06magit-read-module-path: Add Helm kludgeJonas Bernoulli
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.
2026-04-02magit-cygwin-mount-points: Fix typo in previous commitJonas Bernoulli
2026-04-01magit-cygwin-mount-points: Fix regressionJonas Bernoulli
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.
2026-03-31magit-gitignore-in-subdir: Pick up initial directory from current fileJonas Bernoulli
2026-03-31magit-gitignore-read-pattern: Respect DIRECTORYJonas Bernoulli
2026-03-31magit--gitignore-patterns: Respect DIRECTORYJonas Bernoulli
If non-nil, return paths relative to DIRECTORY, because the caller is going to insert the selected path into "DIRECTORY/.gitignore".
2026-03-31magit--untracked-files: New functionJonas Bernoulli
This is a potential replacement for `magit-untracked-files', but actually replacing that requires more work.
2026-03-31magit-gitignore-in-subdir: Expand read directory nameJonas Bernoulli
2026-03-31magit-gitignore-read-pattern: Drop weird usage of diff argumentsJonas Bernoulli
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'.
2026-03-31magit--gitignore-patterns: Spin out new functionJonas Bernoulli
2026-03-31magit--gitignore: Take care of staging and/or refreshingJonas Bernoulli
2026-03-31magit-gitignore-on-system: Make only inapt if variable is unsetJonas Bernoulli
2026-03-31magit-gitignore-{*}: Define using transient-define-suffixJonas Bernoulli
2026-03-30git-commit--modified-defuns: New functionJonas Bernoulli
`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.
2026-03-30magit-commit-diff--{args,show}: New functionsJonas Bernoulli
Split up `magit-commit-diff-1'.
2026-03-30git-commit-insert-changelog-{gnu,plain}: New commandsJonas Bernoulli
2026-03-30magit-diff--modified-defuns: New functionJonas Bernoulli
2026-03-30Support visiting anonymous blobsJonas Bernoulli
I.e., support visiting a blob via its blob oid without knowing a commit and tree path in which it can be found.
2026-03-30magit-wip-commit-worktree: Abort if index is lockedJonas Bernoulli
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.
2026-03-30magit-wip-commit-worktree: Tweak commentsJonas Bernoulli
2026-03-30git-commit.el: Sort function declarationsJonas Bernoulli
2026-03-30git-commit-setup-capf: Force dabbrev initializationJonas Bernoulli
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.
2026-03-30Use cond more instead of if and prognJonas Bernoulli
2026-03-29Use Cond-Let's when$ with longer bodiesJonas Bernoulli
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 `$'.
2026-03-29Use Cond-Let's when$Jonas Bernoulli
2026-03-29Make Cond-Let's when$ availableJonas Bernoulli
2026-03-29magit-process-git-arguments: Fix typo in docstringJonas Bernoulli
2026-03-29magit-blob-oid: Support Git releases before v2.36.0Jonas Bernoulli
Closes #5544.
2026-03-29magit-blob-oid: Do not assume call from top-levelJonas Bernoulli
2026-03-28Fix typos in manual and docstringsJonas Bernoulli
2026-03-28magit--git-insert: Prefix debugging messagesJonas Bernoulli
We enable `magit-git-debug' in hairy cases, in which case it helps to avoid any possible confusion, such about whether a given message is coming from here or elsewhere.