diff options
| author | Dmitry Gutov | 2017-09-13 02:30:45 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2017-09-13 02:31:19 +0300 |
| commit | 4bef92e9e02d074de1d92e30dc5ef4dd62558c80 (patch) | |
| tree | cf01636e9e89e2a9fdeb1bf80996f81db2d34458 | |
| parent | 9b980e2691afa3a7a967011fc004d352750fe618 (diff) | |
| download | emacs-4bef92e9e02d074de1d92e30dc5ef4dd62558c80.tar.gz emacs-4bef92e9e02d074de1d92e30dc5ef4dd62558c80.zip | |
Call vc-resynch-buffer in vc-git-resolve-when-done
* lisp/vc/vc-git.el (vc-git-resolve-when-done):
Call vc-resynch-buffer on the current file (bug#28121).
Move its autoload to before this function.
| -rw-r--r-- | lisp/vc/vc-git.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index cc3e295641c..71cf57ab32e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -951,6 +951,10 @@ This prompts for a branch to merge from." | |||
| 951 | "DU" "AA" "UU")) | 951 | "DU" "AA" "UU")) |
| 952 | (push (expand-file-name file directory) files))))))) | 952 | (push (expand-file-name file directory) files))))))) |
| 953 | 953 | ||
| 954 | ;; Everywhere but here, follows vc-git-command, which uses vc-do-command | ||
| 955 | ;; from vc-dispatcher. | ||
| 956 | (autoload 'vc-resynch-buffer "vc-dispatcher") | ||
| 957 | |||
| 954 | (defun vc-git-resolve-when-done () | 958 | (defun vc-git-resolve-when-done () |
| 955 | "Call \"git add\" if the conflict markers have been removed." | 959 | "Call \"git add\" if the conflict markers have been removed." |
| 956 | (save-excursion | 960 | (save-excursion |
| @@ -964,6 +968,7 @@ This prompts for a branch to merge from." | |||
| 964 | (vc-git-root buffer-file-name))) | 968 | (vc-git-root buffer-file-name))) |
| 965 | (vc-git-conflicted-files (vc-git-root buffer-file-name))) | 969 | (vc-git-conflicted-files (vc-git-root buffer-file-name))) |
| 966 | (vc-git-command nil 0 nil "reset")) | 970 | (vc-git-command nil 0 nil "reset")) |
| 971 | (vc-resynch-buffer buffer-file-name t t) | ||
| 967 | ;; Remove the hook so that it is not called multiple times. | 972 | ;; Remove the hook so that it is not called multiple times. |
| 968 | (remove-hook 'after-save-hook 'vc-git-resolve-when-done t)))) | 973 | (remove-hook 'after-save-hook 'vc-git-resolve-when-done t)))) |
| 969 | 974 | ||
| @@ -1450,10 +1455,6 @@ This command shares argument histories with \\[rgrep] and \\[grep]." | |||
| 1450 | (if (eq next-error-last-buffer (current-buffer)) | 1455 | (if (eq next-error-last-buffer (current-buffer)) |
| 1451 | (setq default-directory dir)))))) | 1456 | (setq default-directory dir)))))) |
| 1452 | 1457 | ||
| 1453 | ;; Everywhere but here, follows vc-git-command, which uses vc-do-command | ||
| 1454 | ;; from vc-dispatcher. | ||
| 1455 | (autoload 'vc-resynch-buffer "vc-dispatcher") | ||
| 1456 | |||
| 1457 | (defun vc-git-stash (name) | 1458 | (defun vc-git-stash (name) |
| 1458 | "Create a stash." | 1459 | "Create a stash." |
| 1459 | (interactive "sStash name: ") | 1460 | (interactive "sStash name: ") |