diff options
| author | Sean Whitton | 2025-07-05 09:49:13 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-07-05 09:49:13 +0100 |
| commit | 45d148680367b73fc19d511b4abe5a4bb961ebc2 (patch) | |
| tree | 44b64c180f5bbad0c85e9449c2a02dd04c14ce71 | |
| parent | cbd4616ae2f876251411ec4217d4ee0b300c401d (diff) | |
| download | emacs-45d148680367b73fc19d511b4abe5a4bb961ebc2.tar.gz emacs-45d148680367b73fc19d511b4abe5a4bb961ebc2.zip | |
Don't call vc-buffer-sync-fileset when committing a patch
* lisp/vc/vc-dispatcher.el (vc-finish-logentry): Move call to
vc-buffer-sync-fileset from here ...
* lisp/vc/vc.el (vc-checkin): ... to here, and conditionalize so
as not to call when committing a patch. Also fix comment.
| -rw-r--r-- | lisp/vc/vc-dispatcher.el | 3 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 6e36f40be75..be50e51ed5f 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el | |||
| @@ -858,9 +858,6 @@ the buffer contents as a comment." | |||
| 858 | ;; Check and record the comment, if any. | 858 | ;; Check and record the comment, if any. |
| 859 | (unless nocomment | 859 | (unless nocomment |
| 860 | (run-hooks 'vc-logentry-check-hook)) | 860 | (run-hooks 'vc-logentry-check-hook)) |
| 861 | ;; Must pass NOT-ESSENTIAL non-nil because we later call | ||
| 862 | ;; `vc-resynch-buffer' with NOQUERY non-nil. | ||
| 863 | (vc-buffer-sync-fileset (list log-edit-vc-backend vc-log-fileset)) | ||
| 864 | (unless vc-log-operation | 861 | (unless vc-log-operation |
| 865 | (error "No log operation is pending")) | 862 | (error "No log operation is pending")) |
| 866 | 863 | ||
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index a4c2cce7056..824959fc231 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1957,6 +1957,11 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." | |||
| 1957 | ;; RCS 5.7 gripes about whitespace-only comments too. | 1957 | ;; RCS 5.7 gripes about whitespace-only comments too. |
| 1958 | (unless (and comment (string-match "[^\t\n ]" comment)) | 1958 | (unless (and comment (string-match "[^\t\n ]" comment)) |
| 1959 | (setq comment "*** empty log message ***")) | 1959 | (setq comment "*** empty log message ***")) |
| 1960 | (unless patch-string | ||
| 1961 | ;; Must not pass non-nil NOT-ESSENTIAL because we will shortly | ||
| 1962 | ;; call (in `vc-finish-logentry') `vc-resynch-buffer' with its | ||
| 1963 | ;; NOQUERY parameter non-nil. | ||
| 1964 | (vc-buffer-sync-fileset (list backend files))) | ||
| 1960 | (when register (vc-register (list backend register))) | 1965 | (when register (vc-register (list backend register))) |
| 1961 | (cl-labels ((do-it () | 1966 | (cl-labels ((do-it () |
| 1962 | ;; We used to change buffers to get local value of | 1967 | ;; We used to change buffers to get local value of |