vc-git-checkin: Don't relativize names of temporary files
* lisp/vc/vc-git.el (vc-git-checkin) (vc-git--stash-staged-changes): Don't relativize names of temporary files passed to 'git apply --cached'. More generally, these are not files managed by the underlying VCS, so they shouldn't go in the FILE-OR-LIST argument to vc-git-command.
This commit is contained in:
parent
ba13e7de32
commit
7f60aa45aa
1 changed files with 4 additions and 3 deletions
|
@ -1202,7 +1202,7 @@ It is based on `log-edit-mode', and has Git-specific extensions."
|
|||
(with-temp-file patch-file
|
||||
(insert vc-git-patch-string))
|
||||
(unwind-protect
|
||||
(vc-git-command nil 0 patch-file "apply" "--cached")
|
||||
(vc-git-command nil 0 nil "apply" "--cached" patch-file)
|
||||
(delete-file patch-file))))
|
||||
(when to-stash (vc-git--stash-staged-changes files)))
|
||||
;; When operating on the whole tree, better pass "-a" than ".",
|
||||
|
@ -1228,7 +1228,7 @@ It is based on `log-edit-mode', and has Git-specific extensions."
|
|||
(unwind-protect
|
||||
(progn (with-temp-file cached
|
||||
(vc-git-command t 0 nil "stash" "show" "-p"))
|
||||
(vc-git-command nil 0 cached "apply" "--cached"))
|
||||
(vc-git-command nil 0 nil "apply" "--cached" cached))
|
||||
(delete-file cached))
|
||||
(vc-git-command nil 0 nil "stash" "drop")))))
|
||||
|
||||
|
@ -1259,7 +1259,8 @@ It is based on `log-edit-mode', and has Git-specific extensions."
|
|||
(unwind-protect
|
||||
(progn
|
||||
(vc-git-command nil 0 nil "read-tree" "HEAD")
|
||||
(vc-git-command nil 0 cached "apply" "--cached")
|
||||
(vc-git-command nil 0 nil "apply" "--cached"
|
||||
cached)
|
||||
(setq tree (git-string "write-tree")))
|
||||
(delete-file index))))
|
||||
(delete-file cached))
|
||||
|
|
Loading…
Add table
Reference in a new issue