chiark / gitweb /
stgit.el: Bugfix moving symlinks to/from index
authorGustav Hållberg <gustav@virtutech.com>
Sat, 1 Aug 2009 21:07:43 +0000 (23:07 +0200)
committerGustav Hållberg <gustav@virtutech.com>
Mon, 3 Aug 2009 13:59:09 +0000 (15:59 +0200)
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
contrib/stgit.el

index 65fe68a37a02b54b3243ef1e5208a1032fd02c35..c4ed9583660a9ee232889b43f01e983738592afc 100644 (file)
@@ -878,7 +878,8 @@ (defun stgit-show ()
 
 (defun stgit-move-change-to-index (file)
   "Copies the workspace state of FILE to index, using git add or git rm"
 
 (defun stgit-move-change-to-index (file)
   "Copies the workspace state of FILE to index, using git add or git rm"
-  (let ((op (if (file-exists-p file) '("add") '("rm" "-q"))))
+  (let ((op (if (or (file-exists-p file) (file-symlink-p file))
+                '("add") '("rm" "-q"))))
     (stgit-capture-output "*git output*"
       (apply 'stgit-run-git (append op '("--") (list file))))))
 
     (stgit-capture-output "*git output*"
       (apply 'stgit-run-git (append op '("--") (list file))))))