path: root/contrib/emacs
diff options
authorMartin Nordholts <>2009-09-03 20:27:24 (GMT)
committerJunio C Hamano <>2009-09-09 19:11:44 (GMT)
commitaaa68dd50f7b4226fdfdfbbe8bbb2dfd9a9e6d66 (patch)
tree361f80e53ddebdcd48febb2d6121e552305a5a08 /contrib/emacs
parent3de8ba021718e80ef1bbf8a5a541beec86930f4c (diff)
git.el: Use git-add-file for unmerged files, remove git-resolve-file
Use `git-add-file' to mark unmerged files as resolved in the *git-status* buffer to be consistent with git's CLI instructions. Also remove `git-resolve-file' to make it clear that that "R" is a now a free keybinding. Signed-off-by: Martin Nordholts <> Acked-by: Alexandre Julliard <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'contrib/emacs')
1 files changed, 1 insertions, 12 deletions
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 8c70ad8..214930a 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1046,7 +1046,7 @@ The FILES list must be sorted."
(defun git-add-file ()
"Add marked file(s) to the index cache."
- (let ((files (git-get-filenames (git-marked-files-state 'unknown 'ignored))))
+ (let ((files (git-get-filenames (git-marked-files-state 'unknown 'ignored 'unmerged))))
;; FIXME: add support for directories
(unless files
(push (file-relative-name (read-file-name "File to add: " nil nil t)) files))
@@ -1119,15 +1119,6 @@ The FILES list must be sorted."
(when buffer (with-current-buffer buffer (revert-buffer t t t)))))
(git-success-message "Reverted" names))))))
-(defun git-resolve-file ()
- "Resolve conflicts in marked file(s)."
- (interactive)
- (let ((files (git-get-filenames (git-marked-files-state 'unmerged))))
- (when files
- (when (apply 'git-call-process-display-error "update-index" "--" files)
- (git-update-status-files files)
- (git-success-message "Resolved" files)))))
(defun git-remove-handled ()
"Remove handled files from the status list."
@@ -1556,7 +1547,6 @@ amended version of it."
(define-key map "P" 'git-prev-unmerged-file)
(define-key map "q" 'git-status-quit)
(define-key map "r" 'git-remove-file)
- (define-key map "R" 'git-resolve-file)
(define-key map "t" toggle-map)
(define-key map "T" 'git-toggle-all-marks)
(define-key map "u" 'git-unmark-file)
@@ -1598,7 +1588,6 @@ amended version of it."
["Next Unmerged File" git-next-unmerged-file t]
["Prev Unmerged File" git-prev-unmerged-file t]
- ["Mark as Resolved" git-resolve-file t]
["Interactive Merge File" git-find-file-imerge t]
["Diff Against Common Base File" git-diff-file-base t]
["Diff Combined" git-diff-file-combined t]