Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4d3ac01e
Commit
4d3ac01e
authored
Jul 23, 2007
by
Dan Nicolaescu
Browse files
(vc-git-workfile-unchanged-p): Update comment.
parent
56b32800
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/vc-git.el
lisp/vc-git.el
+13
-1
No files found.
lisp/ChangeLog
View file @
4d3ac01e
2007-07-23 Alexandre Julliard <julliard@winehq.org>
* vc-git.el (vc-git-workfile-unchanged-p): Update comment.
2007-07-20 Kenichi Handa <handa@m17n.org>
* international/utf-8.el (utf-8-post-read-conversion): Temporarily
...
...
lisp/vc-git.el
View file @
4d3ac01e
...
...
@@ -191,8 +191,20 @@
(
defun
vc-git-checkout-model
(
file
)
'implicit
)
;; XXX Can't this just use the result of vc-git-state?
(
defun
vc-git-workfile-unchanged-p
(
file
)
;; The reason this does not use the result of vc-git-state is that
;; git-diff-index (used by vc-git-state) doesn't refresh the cached
;; stat info, so if the file has been modified it will always show
;; up as modified in vc-git-state, even if the change has been
;; undone, until git-update-index --refresh is run.
;; OTOH the vc-git-workfile-unchanged-p implementation checks the
;; actual content, so it will detect the case of a file reverted
;; back to its original state.
;; The ideal implementation would be to refresh the stat cache and
;; then call vc-git-state, but at the moment there's no git command
;; to refresh a single file, so this will have to be added first.
(
let
((
sha1
(
vc-git--run-command-string
file
"hash-object"
"--"
))
(
head
(
vc-git--run-command-string
file
"ls-tree"
"-z"
"HEAD"
"--"
)))
(
and
head
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment