From ee8b2d8ae29992db10ba0d785b99a7cc60bf2599 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 14 Feb 2026 15:33:44 +0000 Subject: [PATCH] vc-pull-and-push: Fix when visiting untracked files * lisp/vc/vc.el (vc-pull-and-push): Don't fail when called from buffers visiting unregistered or ignored files. --- lisp/vc/vc.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 606a5342086..f2cf96e0730 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4741,8 +4741,6 @@ It also signals an error in a Bazaar bound branch." "First pull, and then push the current branch. The push will only be performed if the pull operation was successful. -You must be visiting a version controlled file, or in a `vc-dir' buffer. - On a distributed version control system, this runs a \"pull\" operation on the current branch, prompting for the precise command if required. Optional prefix ARG non-nil forces a prompt @@ -4753,8 +4751,8 @@ where the pull operation returns a process. On a non-distributed version control system, this signals an error. It also signals an error in a Bazaar bound branch." (interactive "P") - (let* ((vc-fileset (vc-deduce-fileset t)) - (backend (car vc-fileset))) + (let* ((fileset (vc-deduce-fileset t t)) + (backend (car fileset))) (if (vc-find-backend-function backend 'pull) (when-let* ((proc (vc-call-backend backend 'pull arg)) (buf (and (processp proc) (process-buffer proc))))