mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
; * lisp/vc/vc-git.el (vc-git-after-dir-status-stage): Comments.
This commit is contained in:
parent
82109aa726
commit
29990aadda
1 changed files with 10 additions and 0 deletions
|
|
@ -592,6 +592,13 @@ or an empty string if none."
|
|||
"Process sentinel for the various dir-status stages."
|
||||
(let (next-stage
|
||||
(files (vc-git-dir-status-state->files git-state)))
|
||||
;; First stage is always update-index.
|
||||
;; After that, if no commits yet, ls-files-added.
|
||||
;; Otherwise, if there are commits, diff-index.
|
||||
;; After diff-index, if FILES non-nil, ls-files-up-to-date.
|
||||
;; After diff-index, if FILES nil, ls-files-conflict.
|
||||
;; Then always ls-files-unknown.
|
||||
;; Finally, if FILES non-nil, ls-files-ignored.
|
||||
(goto-char (point-min))
|
||||
(pcase (vc-git-dir-status-state->stage git-state)
|
||||
('update-index
|
||||
|
|
@ -639,6 +646,9 @@ or an empty string if none."
|
|||
(vc-git-dir-status-update-file git-state (match-string 1) 'ignored
|
||||
(vc-git-create-extra-fileinfo 0 0))))
|
||||
('diff-index
|
||||
;; This is output from 'git diff-index' without --cached.
|
||||
;; Therefore this stage compares HEAD and the working tree and
|
||||
;; ignores the index (cf. git-diff-index(1) "RAW OUTPUT FORMAT").
|
||||
(setq next-stage (if files 'ls-files-up-to-date 'ls-files-conflict))
|
||||
(while (re-search-forward
|
||||
":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue