branch: externals/agitate commit d88c61dc955fa718b04182d2e9197f46cb00006e Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Update agitate-vc-git-kill-commit-message It now uses the same limit as agitate-vc-git-show and its completion table ensures that the resulting log is not affected. --- README.org | 11 +++++++---- agitate.el | 12 +++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index be31f4a61f..55749286f7 100644 --- a/README.org +++ b/README.org @@ -188,10 +188,13 @@ commits" are documented here: <https://www.conventionalcommits.org/en/v1.0.0/>. #+findex: agitate-vc-git-kill-commit-message + ~agitate-vc-git-kill-commit-message~ :: Append to ~kill-ring~ - message of commit with HASH identifier. q When called interactively, - prompt for =HASH= using minibuffer completion. When point is in a - log-view buffer, make the revision at point the default value of the - prompt. This is useful to quote a past commit message. + message of commit with =HASH= identifier. When called + interactively, prompt for =HASH= using minibuffer completion. When + point is in a log-view buffer, make the revision at point the + default value of the prompt (though also see the command + ~agitate-log-view-kill-revision-expanded~). The number of + completion candidates is limited to the value of + ~vc-log-show-limit~. #+findex: agitate-vc-git-push-prompt-for-remote + ~agitate-vc-git-push-prompt-for-remote~ :: Behave like ~vc-git-push~ diff --git a/agitate.el b/agitate.el index cdc48bbdda..47c9bbefe9 100644 --- a/agitate.el +++ b/agitate.el @@ -407,7 +407,11 @@ arguments." (default-directory (vc-root-dir))) (completing-read prompt - (process-lines vc-git-program "log" "--oneline" "--") + (agitate--completion-table-no-sort + (process-lines + vc-git-program "log" + (format "-n %d" vc-log-show-limit) + "--oneline" "--")) nil t nil 'agitate--vc-git-kill-commit-message-history default-value))) @@ -418,9 +422,11 @@ When called interactively, prompt for HASH using minibuffer completion. When point is in a log-view buffer, make the revision at point -the default value of the prompt. +the default value of the prompt (though also see the command +`agitate-log-view-kill-revision-expanded'). -This is useful to quote a past commit message." +The number of completion candidates is limited to the value of +`vc-log-show-limit'." (interactive (list (agitate--vc-git-get-hash-from-string