(changes)

This commit is contained in:
Marius Vollmer 2008-08-04 04:10:48 +03:00
parent 57f4825f04
commit e8973f0438

View file

@ -236,13 +236,20 @@
;;; Staging ;;; Staging
(defun gits-write-hunk-patch (info file)
(write-region (elt info 1) (elt info 2) file)
(write-region (elt info 3) (elt info 4) file t))
(defun gits-add-thing-at-point () (defun gits-add-thing-at-point ()
(interactive) (interactive)
(let ((info (get-char-property (point) 'gits-info))) (let ((info (get-char-property (point) 'gits-info)))
(if info (if info
(case (car info) (case (car info)
((other-file) ((other-file)
(gits-run "git" "add" (cadr info))))))) (gits-run "git" "add" (cadr info)))
((hunk)
(gits-write-hunk-patch info ".git/gits-tmp")
(gits-run "git" "apply" "--cached" ".git/gits-tmp"))))))
(defun gits-ignore-thing-at-point () (defun gits-ignore-thing-at-point ()
(interactive) (interactive)
@ -336,3 +343,5 @@
(defun git-stage-all () (defun git-stage-all ()
(interactive) (interactive)
(gits-run "git-add" "-u" ".")) (gits-run "git-add" "-u" "."))
;;; Foo