aboutsummaryrefslogtreecommitdiff
path: root/lisp/git-commit.el
AgeCommit message (Collapse)Author
2019-03-20git-commit-filename-regexp: Support the lab commandJonas Bernoulli
See https://emacs.stackexchange.com/questions/48437.
2019-01-02Bump copyright yearsJonas Bernoulli
2018-12-26git-commit-setup: Load magit-process if appropriateJonas Bernoulli
Fixes #3700.
2018-12-19git-commit-run-post-finish-hook: Do nothing if magit isn't availableJonas Bernoulli
2018-12-18git-commit-need-summary-line: New variableJonas Bernoulli
Closes #3676.
2018-12-07git-commit-setup-font-lock: Add keywords to beginningJonas Bernoulli
Before this change `git-commit-elisp-text-mode-keywords' won against the summary element from `git-commit-font-lock-keywords-1', causing the complete summary line to displayed like text in the body.
2018-11-24git-commit-elisp-text-mode-keywords: Cleanup a regexpJonas Bernoulli
Both the symbol `lisp-mode-symbol-regexp' and its value appeared in a from used to construct another regexp. That can't be right.
2018-11-24Rename face git-commit-note to git-commit-keywordJonas Bernoulli
In the rest of Magit we call [those] things "keywords". Do so here too. Additionally we should avoid the term "note" because it means something else in the context of editing text using `git-commit'. A note is an additional text that is associated to a commit (similar to a commit message, but unlike that not actually part of the commit object) so the same word should not be used for a certain kind of substring of a commit message.
2018-11-16Reset Package-Requires for MelpaJonas Bernoulli
2018-11-16Release version 2.90.1v2.90.1Jonas Bernoulli
2018-11-10git-commit-setup-hook: Add bug-reference-mode to defaultJonas Bernoulli
2018-11-08Reset Package-Requires for MelpaJonas Bernoulli
2018-11-08Release version 2.90.0v2.90.0Jonas Bernoulli
2018-11-04git-commit-run-post-finish-hook: CosmeticsJonas Bernoulli
2018-11-03git-commit-post-finish-hook: Don't run for unsafe commandsJonas Bernoulli
When a command like "git rebase --continue" used `EDITOR' to have the user provide a commit message and created a commit with the message it received that way, then it goes on doing other things that may need to lock the index. We therefore cannot run `git-commit-post-finish-hook' after the commit was created because otherwise there would be a race condition between the subprocesses of "git rebase" and whatever git commands the hook calls. Blacklist commands known to keep going after committing. This was previously done in `magit-wip-maybe-add-commit-hook', but we need to prevent all of `git-commit-post-finish-hook' to be inhibited.
2018-11-03git-commit-post-finish-hook: Don't run until commit was createdJonas Bernoulli
When "emacsclient" returns, then that doesn't necessarily mean that "git commit", which used "emacsclient" as the `EDITOR', is already done creating the commit. We do not know the pid of "git commit", so we have to use some other method of finding out when committing is complete. We do so by looping until "HEAD" points at another commit than it did before the commit was initiated. Once that is the case we run the hook. If "HEAD" still points at the same commit after one second, then we give up and don't run the hook.
2018-11-03git-commit-setup: Add to local value of with-editor-post-finish-hookJonas Bernoulli
2018-11-03magit-wip-maybe-add-commit-hook: New functionJonas Bernoulli
2018-11-03git-commit-file-not-found: CosmeticsJonas Bernoulli
2018-10-29Only merge into wipref after commit if any wip mode is enabledJonas Bernoulli
The merging is done using `magit-wip-commit', which does more than just merge. It also creates the wipref if it doesn't exist yet and that is clearly undesirable when the user hasn't enabled any of the wip modes.
2018-10-09magit-post-commit-hook: New hookJonas Bernoulli
Note that there are many more commands that create commits, which do *not* run this hook. See #3496.
2018-10-09git-commit-post-finish-hook: New hookJonas Bernoulli
See #3496.
2018-09-12Silence byte-compilerJonas Bernoulli
2018-08-02git-commit-setup: Fix regression that added dependency on MagitJonas Bernoulli
Fixes #3536.
2018-08-02wipref: Support automatic merging of real branch into wip refJonas Bernoulli
Add new option `magit-wip-merge-mainline' to allow enabling this but keep the older behavior as the default for now.
2018-07-30Merge branch 'maint'Noam Postavsky
2018-07-24git-commit-file-not-found: Handle git-rebase-filename-regexp tooNoam Postavsky
2018-07-24Move cygwin filename handling to ffnf-functionsNoam Postavsky
find-file-not-found-functions is run before other find-file hooks, and so should prevent problems if any of them happen to fail due to running with a non-existent default-directory.
2018-07-13git-commit-setup: Fallback to $GIT_WORK_TREE/.dir-locals.elJonas Bernoulli
... if $GIT_DIR/.dir-locals.el does not exist. The maintainer of a project may wish to enforce some settings in buffers used to edit commit messages, but that did not work until now when $GIT_DIR is detached from the working tree.
2018-07-13git-commit-setup: Pretend that git-commit-mode is a major-modeJonas Bernoulli
This makes it possible to apply directory-local settings for buffers used to edit commit messages based on that fake major-mode. I.e. it is now possible to use `git-commit-mode' as a key in ".dir-locals.el".
2018-07-12git-commit-elisp-text-mode: New mode derived from `text-mode'Jonas Bernoulli
This is intended for use as `git-commit-major-mode' for projects that expect `symbols' to look like this. I.e. like they look in Elisp doc-strings, including this one. Unlike in doc-strings, "strings" also look different than the other text.
2018-07-03git-commit-setup-font-lock: Don't fail in non-existent directoryNoam Postavsky
2018-06-07magit-pkg.el: Update minimal Emacs versionJonas Bernoulli
Also do so in git-commit.el's header.
2018-06-02Reset Package-Requires for MelpaJonas Bernoulli
2018-06-02Release version 2.13.02.13.0Jonas Bernoulli
2018-04-12git-commit-flyspell-verify: Use value of comment-startJonas Bernoulli
2018-04-05git-commit-setup-check-buffer: AutoloadJonas Bernoulli
This allows using "git commit" from the command-line to connect to a running Emacs instance in which the server has been started and in which only "magit-autoloads.el" (but not "git-commit.el" and its dependencies) have been loaded already loaded. $ cd /path/to/magit $ emacs -Q ... --load lisp/magit-autoloads.el \ --eval "(add-hook 'find-file-hook 'git-commit-setup-check-buffer)" \ --funcall server-start & $ cd /path/to/repo $ GIT_EDITOR="emacsclient -t" git commit "..." stands for whatever has to be done to put magit, magit-popup, with-editor and dash on the `load-path'; in my case "-L lisp -L ../with-editor -L ../dash -L ../magit-popup". Re #3415.
2018-04-01Reset Package-Requires for MelpaJonas Bernoulli
2018-04-01Release version 2.12.12.12.1Jonas Bernoulli
2018-03-29Reset Package-Requires for MelpaJonas Bernoulli
2018-03-29Release version 2.12.02.12.0Jonas Bernoulli
2018-03-21git-commit-setup-font-lock: Speedup for large number of branchesJonas Bernoulli
Re https://emacs.stackexchange.com/questions/40518.
2018-02-02Consolidate function declarations and compile-time importsJonas Bernoulli
By the way, in order to get the number of false-positives down to only three, one has to teach `check-declare-verify' about `cl-defun'.
2018-01-26git-commit-prev-message: Fix error in buffers without commentsVladimir Panteleev
When attempting to invoke git-commit-prev-message or git-commit-next-message in a buffer without comments, the functions would fail with the message: git-commit-prev-message: Search failed: "^#" Such a buffer could be the result of a prepare-commit-msg git hook which does not emit any comment lines. The rest of the code was already prepared to handle this scenario, so just fix the re-search-forward invocation to not error when the regexp was not found, and allow the caller to handle the failure.
2018-01-18git-commit-turn-on-flyspell: respect customized comment characterDaniel Kraus
2018-01-08git-commit-setup-font-lock: make sure magit is fully loadedJonas Bernoulli
Fixes #3320.
2018-01-08git-commit.el: only require diff-mode when neededJonas Bernoulli
Unlike what I said in the previous commit `diff-mode' does not normally get loaded anyway. So that commit resulted in it being loaded needlessly in the normal case. Instead just load it when we are about to use it and declare the used variable so that the byte-compiler knows that the variable uses dynamic scope and has nothing to complain about.
2018-01-07git-commit.el: require diff-modeJonas Bernoulli
Even without this it should get loaded, but apparently it may not, see #3317. Even if that should turn out to be a local issue, it would still be a good idea to make this dependency explicit.
2018-01-07Bump copyright yearsJonas Bernoulli
2017-12-14git-commit-font-lock-keywords-2: replace ineffective elementJonas Bernoulli
In the past Git might have said: Not currently on any branch. instead of that it now says: HEAD detached at abcdefg. `git-commit-font-lock-keywords-2' used to have an entry for the former but it did not have any effect because only the first submatch would have been colorized but the regexp had no submatches. As a result the face `git-commit-comment-detached' wasn't actually ever used. Now it is used for the "HEAD" in the new output. Also remove the old bogus entry and don't bother colorizing anything for older Git versions.