diff options
| author | Eric S. Raymond | 2007-12-28 18:16:55 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2007-12-28 18:16:55 +0000 |
| commit | 722f037fc8a4d7e22d700de4504b7db7a9927450 (patch) | |
| tree | 6888a2a7ec7b7363cd39d43fdfe9eaf0274a19b0 /lisp/vc-git.el | |
| parent | 0f67cc71b4047fd71b873a4e73644a097722869c (diff) | |
| download | emacs-722f037fc8a4d7e22d700de4504b7db7a9927450.tar.gz emacs-722f037fc8a4d7e22d700de4504b7db7a9927450.zip | |
* vc-hooks.el (vc-state): Document new 'ignored and 'unregistered
states. and the new return-value convention. These are not
actually used yet, just set.
* vc-svn.el (vc-svn-parse-status): Set 'ignored and 'unregistered
states when appropriate.
* vc-hg.el (vc-hg-state,vc-hg-dir-state): Set 'ignored and
'unregistered' when appropriate.
* vc-git.el: Document that we don't set the new states yet.
* vc.el (vc-dired-state-info): Display 'unregistered and
'ignored states.
* vc-cvs.el (vc-cvs-parse-status): Set the 'ignored state when
appropriate.
* vc-bzr.el (vc-bzr-dir-state): Set 'ignored and
'unregistered' when appropriate.
Diffstat (limited to 'lisp/vc-git.el')
| -rw-r--r-- | lisp/vc-git.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 722e352f4f0..7895251be0e 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el | |||
| @@ -143,6 +143,7 @@ | |||
| 143 | 143 | ||
| 144 | (defun vc-git-state (file) | 144 | (defun vc-git-state (file) |
| 145 | "Git-specific version of `vc-state'." | 145 | "Git-specific version of `vc-state'." |
| 146 | ;; FIXME: This can't set 'ignored yet | ||
| 146 | (vc-git--call nil "add" "--refresh" "--" (file-relative-name file)) | 147 | (vc-git--call nil "add" "--refresh" "--" (file-relative-name file)) |
| 147 | (let ((diff (vc-git--run-command-string file "diff-index" "-z" "HEAD" "--"))) | 148 | (let ((diff (vc-git--run-command-string file "diff-index" "-z" "HEAD" "--"))) |
| 148 | (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} [ADMU]\0[^\0]+\0" | 149 | (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} [ADMU]\0[^\0]+\0" |
| @@ -151,6 +152,8 @@ | |||
| 151 | 'up-to-date))) | 152 | 'up-to-date))) |
| 152 | 153 | ||
| 153 | (defun vc-git-dir-state (dir) | 154 | (defun vc-git-dir-state (dir) |
| 155 | "Git-specific version of `dir-state'." | ||
| 156 | ;; FIXME: This can't set 'ignored yet | ||
| 154 | (with-temp-buffer | 157 | (with-temp-buffer |
| 155 | (buffer-disable-undo) ;; Because these buffers can get huge | 158 | (buffer-disable-undo) ;; Because these buffers can get huge |
| 156 | (vc-git-command (current-buffer) nil nil "ls-files" "-t" "-c" "-m" "-o") | 159 | (vc-git-command (current-buffer) nil nil "ls-files" "-t" "-c" "-m" "-o") |