aboutsummaryrefslogtreecommitdiff
path: root/lisp/git-commit.el
AgeCommit message (Collapse)Author
2023-05-21Place comma after "e.g." and "i.e."Jonas Bernoulli
We already do this in Transient's documentation because that's what is being done in Emacs' documentation and Transient is part of Emacs. Let's be consistent even at the cost of making the English unhappy. Also add a comma before "e.g." and "i.e.", if not inside parentheses, which is the correct thing to do, regardless which style guide one chooses to follow.
2023-05-16git-commit-header-line-format: New variableJonas Bernoulli
Also see previous commit and #4942.
2023-05-16git-commit-setup: Ensure misleading message is shadowedJonas Bernoulli
`git-commit-usage-message' is long enough to potentially span more than one line. Previously one had to remove `with-editor-usage-message' from `git-commit-setup-hook' to prevent that. But then `with-editor-usage-message' wasn't displayed either and that meant that the user got to see the misleading message that `server-execute' insists on showing. Add a new mechanism for disabling showing the long message; setting `git-commit-usage-message' to nil.
2023-03-13Remove face aliases, obsolete since v2.12.0 and v3.0.0Jonas Bernoulli
2023-03-13Remove git-commit-fill-column, obsolete since v2.11.0Jonas Bernoulli
2023-02-20Place declare-function at top-levelJonas Bernoulli
As suggested by Stefan Monnier: > I just saw this code in emacsql: > > (unless (require 'sqlite3 nil t) > (declare-function sqlite3-open "sqlite3-api") > (declare-function sqlite3-exec "sqlite3-api") > (declare-function sqlite3-close "sqlite3-api")) > > This isn't right: the `require` and the `unless` will be executed only at > runtime, not during compilation, but that that time the > `declare-function`s will have disappeared, so you'll end up running > > (unless (require 'sqlite3 nil t) > ) > > Also the effect of `declare-function` should be limited to "the current > scope", which could be argued to end at the end of the `unless` (I don't > know if that's how the byte-compiler currently treats it, but that's how > I think it should, ideally). > > So I think you want to just remove the `unless`. > This way both the `require` and the `declare-function`s will be at > top-level where the compiler likes them to be.
2023-02-13Use defvar-keymap from Emacs 29.1 or the Compat packageJonas Bernoulli
2023-02-12Bump compat dependencyJonas Bernoulli
2023-02-11Bump compat dependency, seq is loaded by CompatDaniel Mendler
2023-02-06Revert "git-commit-setup: Enable mode after setting local variables"Jonas Bernoulli
This reverts commit ece2cb84dd31aa967ef37a0d8bc2293c1c52db87. That commit's goal was to ensure that we don't unset variables that are not permanently local but that also prevented the major- mode specified with `git-commit-major-mode' from being enabled. Eventually we should fix both issues.
2023-02-04Bump dependenciesJonas Bernoulli
2023-01-03Bump copyright yearsJonas Bernoulli
2022-12-26git-commit-post-finish-hook-timeout: New optionLénaïc Huard
`git-commit-post-finish-hook' is not run until the new commit has been created. If Git takes more than 1 second to do so, the hook isn’t run. Whereas a 1 second timeout seems reasonable for most use cases, there are use cases where a greater time is desirable. For ex., when git is configured to sign commits with GnuPG, the user might be interactively prompted to enter the passphrase of the GnuPG private key. If the user takes more than 1 second to type their passphrase, the hook isn’t run. In order to address such use cases, the new variable `git-commit-post-finish-hook-timeout' allows to tune the value of this timeout. Co-authored-by: Jonas Bernoulli <jonas@bernoul.li> Name of new option and docstring tweaks.
2022-11-27Use new version string format for unreleased revisionsJonas Bernoulli
"N-git" < "N"; but "N.50-git" > "N".
2022-11-06git-commit: Add "Co-developed-by" headerWaqar Hameed
This is a commonly used header, for example in patches for the Linux kernel (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst).
2022-11-01git-commit-font-lock-keywords-1: Use more restrictive keyword regexpJonas Bernoulli
Closes #4806.
2022-09-18Use line-beginning-position instead of obsolete point-at-bolJonas Bernoulli
Obsolete since Emacs 29 / b7e867b841f47dcff3aeaef9b5608a237386ce70.
2022-08-03Set coding system for remaining libraries that need itKyle Meyer
The set of files that contain non-ASCII characters has grown since 1c6205d8 (Only set coding system for libraries that need it, 2016-12-27). Set the coding system for all files listed by git grep -lP '[^\x00-\x7f]' '*.el' Closes #4732.
2022-06-15Bump minimal Compat versionJonas Bernoulli
2022-06-07magit-commit-diff: Remember commit commandJonas Bernoulli
2022-05-06git-commit.el: Rearrange dependenciesJonas Bernoulli
Also state why we are going through all this trouble.
2022-04-29Require at least Compat 28.1.1.0Jonas Bernoulli
2022-04-22Refresh library headersJonas Bernoulli
2022-04-22Depend on the compat package from GNU ElpaJonas Bernoulli
2022-04-01Fix indentationJonas Bernoulli
2022-03-28Function-quote many more functionsJonas Bernoulli
2022-02-22Rename magit-utils.el to magit-base.elJonas Bernoulli
It hasn't been true for quite some time that this library only (or even just mostly) defined things that have "very little to do with Git or Magit", and it is time to account for that. "magit-base.el" serves a role similar to that of "magit-core.el", except that it comes even earlier in the dependency tree. For that reason other libraries that depend on one or more of the libraries that `magit-base' depends on should just require that feature.
2022-02-21git-commit-self-ident: Demote errors rather than ignoring themKyle Meyer
Some of the "insert header" commands use git-commit-self-ident to get a name and email. git-commit-self-ident wraps its git-config calls in ignore-errors and then proceeds to fallback values. user.name and user.email are something that all Git users should configure, and git-commit will complain ("Please tell me who you are ..."). Use with-demoted-errors instead of ignore-errors so that there's a message about these variables being unset. This change means that errors won't be caught when debug-on-error is non-nil, but, given git-commit-self-ident is called only by "insert header" commands, that seems appropriate. Re: magit/with-editor#106
2022-02-21git-commit-setup-font-lock: Demote errorsKyle Meyer
Any error in git-commit-setup-font-lock will cause committing to fail with something like: 1 git … commit -- hint: Waiting for your editor to close the file... Waiting for Emacs... *ERROR*: ... error: There was a problem with the editor '/path/to/emacsclient --socket-name=...' Please supply the message using either -m or -F option. Demote these errors to messages to prevent committing from failing due to any error related to font locking. Re: magit/with-editor#106
2022-02-21git-commit-setup-font-lock: Tighten git-config output processingKyle Meyer
git-commit-setup-font-lock calls 'git config core.commentchar' via call-process. This call exits with 1 if the key isn't found. On success or failure, that normally shouldn't produce any stderr, and on success the only stdout should be the core.commentchar. But to be safe and reduce the chances of processing unintended output, 1) stop if there was a non-zero exit and 2) insert only standard output into the buffer.
2022-02-21git-commit: Use magit-git-executable function if availableKyle Meyer
Three spots in git-commit.el hard code "git" as the git executable. Two of these spots are in git-commit-self-ident. If the user doesn't have git in $PATH, these spots aren't much of a problem because 1) these calls are wrapped with ignore-errors and have fallback values and 2) their only callers are some of the git-commit-* "insert header" commands. The "git" in git-commit-setup-font-lock, on the other hand, can cause committing to fail if git isn't in $PATH: 1 git … commit -- hint: Waiting for your editor to close the file... Waiting for Emacs... *ERROR*: Searching for program: No such file or directory, git [...] A Magit user without git in $PATH must configure the magit-git-executable variable, so teach git-commit.el to try to get the executable path from the magit-git-executable function. Using the function means that the appropriate path is also used for Tramp buffers. Fixes magit/with-editor#106.
2022-01-30Hardcode version string for nowJonas Bernoulli
2022-01-01Bump copyright yearsJonas Bernoulli
2021-12-04git-commit-search-message-{backward,forward}: Don't use format-promptKyle Meyer
format-prompt isn't available until (what will be) Emacs 28.1. Use a plain format call instead. The new behavior is different in that 1) it doesn't respect minibuffer-default-prompt-format and 2) it shows "(default )" for an empty string default rather than hiding the default entirely. The first seems an acceptable trade for compatibility while avoiding a wrapper/kludge. And the second seems fine in general given that the empty string is in fact the default, so it's worth telling the user about the useless default value.
2021-12-04Fix previous commitJonas Bernoulli
2021-12-03git-commit-search-message-{backward,forward}: New commandsJonas Bernoulli
Closes #4537.
2021-12-03git-commit-save-message: Report whether message was savedJonas Bernoulli
2021-10-10No longer depend on dashJonas Bernoulli
2021-10-07git-commit-turn-on-orglink: Fix code typo from last commitKyle Meyer
2021-10-08git-commit-turn-on-orglink: Don't do it in org-modeJonas Bernoulli
Re https://github.com/tarsius/orglink/issues/12.
2021-10-06git-commit-turn-on-orglink: New functionJonas Bernoulli
2021-10-04Release version 3.3.0v3.3.0Jonas Bernoulli
2021-10-04git-commit: Silence byte-compilerJonas Bernoulli
2021-09-20git-commit-use-local-message-ring: New optionJonas Bernoulli
Closes #4503.
2021-09-20git-commit-setup: Enable mode after setting local variablesJonas Bernoulli
Otherwise all non-permanent variables would get reset.
2021-08-06Release version 3.2.1v3.2.1Jonas Bernoulli
2021-08-06Agnostic reaction to ELPA snapshot version schismJonas Bernoulli
- For multi-library packages Melpa gets the dependency information from <package>-pkg.el files. Melpa uses timestamps for snapshot versions, so that is what we store in these files. - NonGNU Elpa gets the dependency information from headers in a package's main library. In NonGNU Elpa snapshot versions consist of the release followed by a timestamp, so we store the release versions in the library headers.
2021-08-01Reset Package-Requires for MelpaJonas Bernoulli
2021-08-01Release version 3.2.0v3.2.0Jonas Bernoulli
2021-07-02Reset Package-Requires for MelpaJonas Bernoulli