path: root/contrib/emacs
diff options
authorAlexandre Julliard <>2008-01-08 13:45:46 (GMT)
committerJunio C Hamano <>2008-01-09 00:17:44 (GMT)
commit87e3d812943f3d9c5f9464b0aee83398dd9d028e (patch)
treef1268cfea69e4e753658b9eec596f0d64c83bd31 /contrib/emacs
parentd8c3794503553c22330f46ed4c0e70a6613d2f65 (diff)
git.el: Make sure we never insert the same file twice.
Skip non-zero stage files during git-ls-files -c, they are handled later. Also fix git-insert-info-list to merge duplicate file names. Signed-off-by: Alexandre Julliard <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'contrib/emacs')
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 9a0f03f..c826017 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -608,7 +608,7 @@ and returns the process output as a string."
(while info
(setf (git-fileinfo->needs-refresh info) t)
(cond ((not node)
- (ewoc-enter-last status info)
+ (setq node (ewoc-enter-last status info))
(setq info (pop infolist)))
((string-lessp (git-fileinfo->name (ewoc-data node))
(git-fileinfo->name info))
@@ -620,7 +620,7 @@ and returns the process output as a string."
(setf (ewoc-data node) info)
(setq info (pop infolist)))
- (ewoc-enter-before status node info)
+ (setq node (ewoc-enter-before status node info))
(setq info (pop infolist)))))))
(defun git-run-diff-index (status files)
@@ -677,7 +677,7 @@ Return the list of files that haven't been handled."
(apply #'git-call-process-env t nil "ls-files" "-z" "-s" "-c" "--" files)
(goto-char (point-min))
- (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-3]\t\\([^\0]+\\)\0" nil t)
+ (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t)
(let* ((new-perm (string-to-number (match-string 1) 8))
(old-perm (if (eq default-state 'added) 0 new-perm))
(name (match-string 2)))