Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git.el: Add possibility to mark files directly in git-update-status-files.
author
Alexandre Julliard
<julliard@winehq.org>
Sat, 1 Nov 2008 19:14:10 +0000
(20:14 +0100)
committer
Alexandre Julliard
<julliard@winehq.org>
Sun, 23 Nov 2008 10:54:41 +0000
(11:54 +0100)
This avoids the need to go through the list twice, which helps
performance on large file lists.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
contrib/emacs/git.el
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b0a53e9
)
diff --git
a/contrib/emacs/git.el
b/contrib/emacs/git.el
index 6119c31d05717657441afad00152ad6abf5d0b27..9e9101b17ee8646081e4bc006fc12a29a0d68fe4 100644
(file)
--- a/
contrib/emacs/git.el
+++ b/
contrib/emacs/git.el
@@
-752,7
+752,7
@@
Return the list of files that haven't been handled."
(concat "--exclude-per-directory=" git-per-dir-ignore-file)
(append options (mapcar (lambda (f) (concat "--exclude-from=" f)) exclude-files)))))
(concat "--exclude-per-directory=" git-per-dir-ignore-file)
(append options (mapcar (lambda (f) (concat "--exclude-from=" f)) exclude-files)))))
-(defun git-update-status-files (&optional files)
+(defun git-update-status-files (&optional files
mark-files
)
"Update the status of FILES from the index."
(unless git-status (error "Not in git-status buffer."))
;; set the needs-update flag on existing files
"Update the status of FILES from the index."
(unless git-status (error "Not in git-status buffer."))
;; set the needs-update flag on existing files
@@
-777,12
+777,12
@@
Return the list of files that haven't been handled."
(when remaining-files
(setq remaining-files (git-run-ls-files-cached git-status remaining-files 'uptodate)))
(git-set-filenames-state git-status remaining-files nil)
(when remaining-files
(setq remaining-files (git-run-ls-files-cached git-status remaining-files 'uptodate)))
(git-set-filenames-state git-status remaining-files nil)
+ (when mark-files (git-mark-files git-status files))
(git-refresh-files)
(git-refresh-ewoc-hf git-status)))
(defun git-mark-files (status files)
"Mark all the specified FILES, and unmark the others."
(git-refresh-files)
(git-refresh-ewoc-hf git-status)))
(defun git-mark-files (status files)
"Mark all the specified FILES, and unmark the others."
- (setq files (sort files #'string-lessp))
(let ((file (and files (pop files)))
(node (ewoc-nth status 0)))
(while node
(let ((file (and files (pop files)))
(node (ewoc-nth status 0)))
(while node
@@
-1371,9
+1371,7
@@
amended version of it."
(git-call-process-display-error "reset" "--soft" "HEAD^")
(and (git-update-ref "ORIG_HEAD" commit)
(git-update-ref "HEAD" nil commit)))
(git-call-process-display-error "reset" "--soft" "HEAD^")
(and (git-update-ref "ORIG_HEAD" commit)
(git-update-ref "HEAD" nil commit)))
- (git-update-status-files (copy-sequence files))
- (git-mark-files git-status files)
- (git-refresh-files)
+ (git-update-status-files files t)
(git-setup-commit-buffer commit)
(git-commit-file))))
(git-setup-commit-buffer commit)
(git-commit-file))))