diff options
| author | Kévin Le Gouguec | 2024-08-21 08:45:00 +0200 |
|---|---|---|
| committer | Sean Whitton | 2024-08-21 15:56:41 +0800 |
| commit | 53ea5f1df411aa349fb99d6b444d433a42ded594 (patch) | |
| tree | cb01b57597fbf291bd66dc79712851ff53b6e9eb | |
| parent | 88ac5d03586a81cc8644e75adbdb3cab9b56a1b9 (diff) | |
| download | emacs-53ea5f1df411aa349fb99d6b444d433a42ded594.tar.gz emacs-53ea5f1df411aa349fb99d6b444d433a42ded594.zip | |
Restore vc-git helper function (bug#68183)
* lisp/vc/vc-git.el (vc-git--cmds-in-progress): Restore; it was removed
in a previous refactoring patch, but we may still find use for it.
(vc-git-dir--in-progress-headers): Use it.
| -rw-r--r-- | lisp/vc/vc-git.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 4d631c7e032..dedf6fdd219 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -748,8 +748,8 @@ or an empty string if none." | |||
| 748 | (and tracking (fmt "Tracking" tracking)) | 748 | (and tracking (fmt "Tracking" tracking)) |
| 749 | (and remote-url (fmt "Remote" remote-url))))))) | 749 | (and remote-url (fmt "Remote" remote-url))))))) |
| 750 | 750 | ||
| 751 | (defun vc-git-dir--in-progress-headers () | 751 | (defun vc-git--cmds-in-progress () |
| 752 | "Return headers for Git commands in progress in this worktree." | 752 | "Return a list of Git commands in progress in this worktree." |
| 753 | (let ((gitdir (vc-git--git-path)) | 753 | (let ((gitdir (vc-git--git-path)) |
| 754 | cmds) | 754 | cmds) |
| 755 | ;; See contrib/completion/git-prompt.sh in git.git. | 755 | ;; See contrib/completion/git-prompt.sh in git.git. |
| @@ -765,6 +765,11 @@ or an empty string if none." | |||
| 765 | (push 'merge cmds)) | 765 | (push 'merge cmds)) |
| 766 | (when (file-exists-p (expand-file-name "BISECT_START" gitdir)) | 766 | (when (file-exists-p (expand-file-name "BISECT_START" gitdir)) |
| 767 | (push 'bisect cmds)) | 767 | (push 'bisect cmds)) |
| 768 | cmds)) | ||
| 769 | |||
| 770 | (defun vc-git-dir--in-progress-headers () | ||
| 771 | "Return headers for Git commands in progress in this worktree." | ||
| 772 | (let ((cmds (vc-git--cmds-in-progress))) | ||
| 768 | (cl-flet ((fmt (cmd name) | 773 | (cl-flet ((fmt (cmd name) |
| 769 | (when (memq cmd cmds) | 774 | (when (memq cmd cmds) |
| 770 | ;; For now just a heading, key bindings can be added | 775 | ;; For now just a heading, key bindings can be added |