aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-process.el
AgeCommit message (Collapse)Author
2026-04-08magit--git-w32-path-hack: Renamed variableJonas Bernoulli
2026-03-30Use cond more instead of if and prognJonas Bernoulli
2026-03-29Make Cond-Let's when$ availableJonas Bernoulli
2026-01-01Improve indentation of condJonas Bernoulli
Emacs 31.1 adds variable `lisp-indent-local-overrides'.
2026-01-01Bump copyright yearsJonas Bernoulli
2025-12-15Add support for triggering lisp hooks from git hooksJonas Bernoulli
2025-12-02magit--early-process-lines: New internal helper functionJonas Bernoulli
2025-09-18Use cond moreJonas Bernoulli
2025-09-18magit-process-display-buffer: Use when-let*Jonas Bernoulli
2025-08-23Use font-lock-face for more text inserted into Magit buffersJonas Bernoulli
Stick to doing so using `magit--propertize-face' for now. Stick to not doing it for strings inserted into minibuffers or into transient menu buffers, or used in messages. (Except where we already do.) This needs more work (including design decisions). This commit just fixes some broken cases.
2025-08-22Avoid t condition in final match-all cond clauseJonas Bernoulli
If there is a single BODY form in the final clause, we can just use that as the CONDITION instead (because the value of that is returned if the BODY is empty). I've been gravitating towards that style for a long time, but because I realize that this is not without issue and that there are certainly those that would find this practice questionable, I refrained from updating existing code until now. The main problem with dropping the `t' is that it is not always immediately obvious if one is looking at (cond ... ((foo bar))) or (cond ... ((foo) (bar))) That's why I still use `t' when the single BODY form is too long and/or complex, despite fitting on one line. In this case from `magit-log-move-to-revision', for example, I was on the fence: (cond ... ((apply #'magit-log-all-branches (magit-log-arguments)))) (It's worth noting that the same issue also occurs when reading non-final-catch-all clauses.) On the other hand, the single BODY form can also be complex *enough* to allow using it as the CONDITION, without that being hard to parse. E.g., when it spans multiple lines, and indentation keeps increasing, and/or when BODY is a `let' from or similar. Used like this, `cond' becomes more similar to `or' in certain situations, but even then they still behave differently, consider: (or (and CONDITION maybe-nil) ...) vs (cond (CONDITION maybe-nil) ...)
2025-08-22Use Cond-Let's and$Jonas Bernoulli
Anaphoric macros get a bad rep and while my own infatuation was somewhat short lived, there are cases where I still find them useful, such as in the case of (and$ (function-with-a-name-that-makes-if-obvious-what-is-returned) (function-with-a-name-that-makes-if-obvious-what-is-expected $)) Many of the cases where this commits starts using `and$', fall squarely into that category. There are a few where I an on the fence. That's because I've just invented this macro and need some practice to fully develop my sense of when it is, and is not, appropriate to use this macro.
2025-08-22Use Cond-Let's implementation of and-letJonas Bernoulli
Using the "other elements of VARLIST have access to SYMBOLs from earlier elements" variant is IMHO _wrong_ when there are in fact no other elements.
2025-08-22Use Cond-Let's implementations of {if,when,and,while}-let{,*}Jonas Bernoulli
Cond-Let's `if-let', `if-let*', `when-let', `when-let*' and `and-let*' implementations behave differently from the built-in implementations, but because I have been careful not to depend on the idiosyncrasies, switching over should be mostly safe. Also add shorthands for the other `cond-let--...' macros. We will start using those (and `cond-let' and `cond-let*') in later commits.
2025-08-07Use _ in all non-binding entries in the varlist of COND-let formsJonas Bernoulli
This was not done until now because doing so resulted in a warning because the macro expansion did not actually leave any variables unused. This was fixed in Emacs 30.1 and I've added a backport to Transient, which this package can also take advantage of. Without consistently using `_' one would always have to count parens to be sure whether a member of the varlist does or does not bind a variable. It is very easy to make mistake when writing or reading such forms, if `_' is not consistently used in the non-binding cases.
2025-07-25Use shorthand match-str instead of match-string-no-propertiesJonas Bernoulli
Almost always would it be better to use `match-string-no-properties' instead of `match-string', but because the name of the former is excruciatingly long for a function that one often wants to use in tight spaces and because it usually "does not really matter", I usually went for the latter. The problem is, it does matter. For example, even strings that are usually only used by code may end up obfuscating debug statements. So let's start doing the right thing, even though there surely will be people frowning at the use of a shorthand. The fake ("match-string" "match-string") shorthand is necessary to protect literal `match-string' and `match-string-no-properties' from being corrupted by interpreted as shorthand for the non-existent `match-stringing' and `match-string-no-propertiesing'. Unfortunately the shorthands have to be specified in each library individually. Using "dir-locals.el" only works if the libraries are compiled. At least this additional noise is neatly tucked away at the end of the files. It might turn out that out of the more than two hundred instances where this replaces `match-string' with `match-string-no-properties' we should have stuck with the former in an instance or two. That's the price of progress and can be fixed once such regressions are reported.
2025-07-11Document return value of functions running process synchronouslyJonas Bernoulli
2025-06-16magit-show-process-buffer-hint: New optionJonas Bernoulli
2025-06-16magit-process-finish: Show usage hint even if error is signaledJonas Bernoulli
Inform the user that the process buffer contains the full error (and other output), regardless of whether `message' or `signal' is used to show a short error message in the echo area. Closes #5396.
2025-06-16magit-process-finish: Look up key binding in current bufferJonas Bernoulli
2025-06-16magit-process-finish: Remove unnecessary commentsJonas Bernoulli
2025-04-28magit-credential-cache-daemon-socket: CosmeticsJonas Bernoulli
2025-04-15magit-process-section: Define earlier to avoid warningJonas Bernoulli
The `process' slot is added by this class and used in `magit-start-process'.
2025-03-27magit-process-apply-ansi-colors: New optionJonas Bernoulli
By popular demand, add this option, but warn against customizing it. Closes #5348.
2025-02-27Consistently begin custom choice tags with capital letterJonas Bernoulli
2025-02-21Fix various prompts and messagesJonas Bernoulli
2025-02-04magit-process-yes-or-no-prompt-regexp: eval-when-compile valueJonas Bernoulli
2025-02-02Use ## and seq-some instead of --someJonas Bernoulli
In two cases use lambda, not ##.
2025-02-02Use ## and seq-some instead of --any-pJonas Bernoulli
2025-02-02Use ## and seq-find instead of --firstJonas Bernoulli
In one case use lambda and in another pcase-lambda, not ##.
2025-02-01Next release will be 4.3.0Jonas Bernoulli
2025-01-30magit-process-yes-or-no-prompt-regexp: Fix regexp for cli passphrasesJonas Bernoulli
When we stopped matching text that might identify the key in [1: a43c1d8d7a], the intention was only to avoid false-negatives by being to restrictive. However, since `magit-process-match-prompt' only returns the matched text (i.e., it doesn't extend to the end of the line), we do have to match the full line. Allow anything after "passphrase" and only insist on the trailing colon. See #5291. 1: 2025-01-25 a43c1d8d7a99dd2b9f865285bed442dddb0e5ce8 magit-process-password-prompt-regexps: Increase flexibility
2025-01-25magit-process-password-prompt-regexps: Increase flexibilityJonas Bernoulli
- Account for different levels of politeness and verbosity, but insist on reasonable capitalization. - Since we don't try to determine a key's identifier anyway, when asked for a passphrase, essentially only look for a reasonably anchored string "passphrase". - Make the trailing space after the colon optional in one more case, for consistency. Now it is optional in all cases. We cannot know for sure from strings posted into the issue tracker, whether the colon was or was not followed by a space.
2025-01-25magit-process-password-prompt-regexps: Split out a non-host regexpJonas Bernoulli
2025-01-25magit-process-password-prompt-regexps: Split out a host regexpJonas Bernoulli
OpenSSH may use prompts like "(user@host) Password for user@host: ". Let's treat that separately to avoid obfuscating the regexp used for less repetitive host prompts.
2025-01-25magit-process-password-prompt-regexps: Match double-quotesJonas Bernoulli
2025-01-25magit-process-password-prompt-regexps: Move a newlineJonas Bernoulli
2025-01-25magit-process-password-prompt-regexps: Group regexps by typeJonas Bernoulli
2025-01-25magit-process-password-prompt-regexps: Remove redundant regexpJonas Bernoulli
The one right before matches too, and sets host match group.
2025-01-25magit-process:password-prompt-regexps: New testJonas Bernoulli
2025-01-25magit-process-match-prompt: Tweak docstringJonas Bernoulli
2025-01-09Use magit-msg moreJonas Bernoulli
2025-01-05Let the byte-compiler check more function referencesJonas Bernoulli
2025-01-05magit-maybe-save-repository-buffers: Add to hooks in their definitionJonas Bernoulli
For `magit-pre-refresh-hook' that is already being done.
2025-01-01Bump copyright yearsJonas Bernoulli
2024-12-23magit-toggle-subprocess-record: New commandJonas Bernoulli
This is a refinement of the functionality, which was previously enabled using the variable `magit-process-extreme-logging' (which we remove).
2024-11-22magit-process-password-prompt-regexps: Add another user@host lookupJonas Bernoulli
Add another entry that always prompts, because the modified entry may stop matching some prompts (containing an unusual quote). Also tweak another entry. Fixes #5257.
2024-11-22magit-process-password-auth-source: Trim docstringJonas Bernoulli
These setup instructions are no longer needed because this function is used by default.
2024-10-23magit-run-git-async: No longer clutter *Messages* bufferJonas Bernoulli
We still show the run command in the echo area and log the command and its output to the process buffer. Additionally logging the run command to the *Messages* buffer is redundant.
2024-10-19magit-process-mode-map: Override magit-refresh bindingJonas Bernoulli
Refreshing the process buffer is not useful.