From 306b37a63112bf26cac29474116490376537f04f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustav=20H=C3=A5llberg?= Date: Sat, 1 Aug 2009 23:07:43 +0200 Subject: [PATCH] stgit.el: Bugfix moving symlinks to/from index MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Gustav HÃ¥llberg --- contrib/stgit.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index 65fe68a..c4ed958 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -878,7 +878,8 @@ If PATCHSYM is a keyword, returns PATCHSYM unmodified." (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)))))) -- 2.11.0