Browse Source

Fix git cleanup of deleted files

Carsten Dominik 15 years ago
parent
commit
562fa025f8
2 changed files with 4 additions and 2 deletions
  1. 2 0
      lisp/ChangeLog
  2. 2 2
      lisp/org-attach.el

+ 2 - 0
lisp/ChangeLog

@@ -1,5 +1,7 @@
 2010-04-02  Carsten Dominik  <carsten.dominik@gmail.com>
 2010-04-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
+	* org-attach.el (org-attach-commit): Split on newlines.
+
 	* org.el (org-export-latex-default-packages-alist): Use list
 	* org.el (org-export-latex-default-packages-alist): Use list
 	instead of cons for the entries.
 	instead of cons for the entries.
 
 

+ 2 - 2
lisp/org-attach.el

@@ -245,12 +245,12 @@ This checks for the existence of a \".git\" directory in that directory."
       (with-temp-buffer
       (with-temp-buffer
 	(cd dir)
 	(cd dir)
 	(shell-command "git add .")
 	(shell-command "git add .")
-	(shell-command "git ls-files --deleted -z" t)
+	(shell-command "git ls-files --deleted" t)
 	(mapc '(lambda (file)
 	(mapc '(lambda (file)
 		 (unless (string= file "")
 		 (unless (string= file "")
 		   (shell-command
 		   (shell-command
 		    (concat "git rm \"" file "\""))))
 		    (concat "git rm \"" file "\""))))
-	      (split-string (buffer-string) ""))
+	      (split-string (buffer-string) "\n"))
 	(shell-command "git commit -m 'Synchronized attachments'")))))
 	(shell-command "git commit -m 'Synchronized attachments'")))))
 
 
 (defun org-attach-tag (&optional off)
 (defun org-attach-tag (&optional off)