Function: vc-dir-resynch-file

vc-dir-resynch-file is a byte-compiled function defined in vc-dir.el.gz.

Signature

(vc-dir-resynch-file &optional FNAME)

Documentation

Update the entries for FNAME in any directory buffers that list it.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
(defun vc-dir-resynch-file (&optional fname)
  "Update the entries for FNAME in any directory buffers that list it."
  (let ((file (file-truename (or fname buffer-file-name))))
    (vc-dir--buffers-dolist status-buf
      ;; Look for a VC-Dir buffer that might show this file.
      (let ((ddir (expand-file-name
                   ;; The actual contents of this VC-Dir buffer, which
                   ;; is what we care about here, is always relative to
                   ;; the toplevel value.  If we invoked the current
                   ;; command from STATUS-BUF then it might have
                   ;; shadowed `default-directory' in order to do its
                   ;; work, but that's irrelevant to us here.
                   (buffer-local-toplevel-value 'default-directory))))
        (when (file-in-directory-p file ddir)
          (if (file-directory-p file)
	      (progn
		(vc-dir-resync-directory-files file)
		(vc-dir--set-header ddir))
            (let* ((complete-state
                    ;; Pass two truenames (bug#80803, bug#80967).
                    (vc-dir-recompute-file-state file
                                                 (file-truename ddir)))
		   (state (cadr complete-state)))
              (vc-dir-update (list complete-state)
                             status-buf
                             (or (not state)
				 (eq state 'up-to-date))))))))))