-(defun vc-git--ls-files-state (state &rest args)
- "Set state to STATE on all files found with git-ls-files ARGS."
- (with-temp-buffer
- (apply 'vc-git-command (current-buffer) nil nil "ls-files" "-z" args)
- (goto-char (point-min))
- (let ((start (point)))
- (while (search-forward "\0" nil t)
- (let ((file (expand-file-name
- (buffer-substring-no-properties start (1- (point))))))
- (vc-file-setprop file 'vc-backend (if state 'Git 'none))
- (vc-file-setprop file 'vc-state state))
- (setq start (point))))))
-