Use magit-git-output instead of magit-git-string in magit-interactive-resolve

closes #1: magit-git-string was responsible for trimming the last \n
This commit is contained in:
Rémi Vanicat 2010-05-13 16:26:12 +08:00 committed by Phil Jakckson
parent 11c14b6357
commit 0c1f170e44

View file

@ -3998,16 +3998,13 @@ With prefix force the removal even it it hasn't been merged."
(error "Cannot resolve %s" file))
(with-current-buffer base-buffer
(if (string-match "^[0-9]+ [0-9a-f]+ 1" merge-status)
(insert (magit-git-string "cat-file" "blob"
(concat ":1:" file)))))
(insert (magit-git-output `("cat-file" "blob" ,(concat ":1:" file))))))
(with-current-buffer our-buffer
(if (string-match "^[0-9]+ [0-9a-f]+ 2" merge-status)
(insert (magit-git-string "cat-file" "blob"
(concat ":2:" file)))))
(insert (magit-git-output `("cat-file" "blob" ,(concat ":2:" file))))))
(with-current-buffer their-buffer
(if (string-match "^[0-9]+ [0-9a-f]+ 3" merge-status)
(insert (magit-git-string "cat-file" "blob"
(concat ":3:" file)))))
(insert (magit-git-output `("cat-file" "blob" ,(concat ":3:" file))))))
;; We have now created the 3 buffer with ours, theirs and the ancestor files
(with-current-buffer (ediff-merge-buffers-with-ancestor our-buffer their-buffer base-buffer)
(make-local-variable 'magit-ediff-file)