about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2008-04-09 18:53:41 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2008-04-09 18:53:41 +0200
commit2d341311055de31d8842cb6cc99c45ae5c8ef987 (patch)
treed8c22f196763e0e4b35fadaab69922ee307338c6
parent974d1193d2d0c039ba4d89d776218bf3a2fbe564 (diff)
downloadgitsum-2d341311055de31d8842cb6cc99c45ae5c8ef987.tar.gz
gitsum-2d341311055de31d8842cb6cc99c45ae5c8ef987.tar.xz
gitsum-2d341311055de31d8842cb6cc99c45ae5c8ef987.zip
Ensure log buffer has correct default-directory
-rw-r--r--gitsum.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitsum.el b/gitsum.el
index fcc9262..ccef992 100644
--- a/gitsum.el
+++ b/gitsum.el
@@ -87,9 +87,11 @@ A numeric argument serves as a repeat count."
   "Commit the patch as-is, asking for a commit message."
   (interactive)
   (shell-command-on-region (point-min) (point-max) "git apply --check --cached")
-  (let ((buffer (get-buffer-create "*gitsum-commit*")))
+  (let ((buffer (get-buffer-create "*gitsum-commit*"))
+        (dir default-directory))
     (shell-command-on-region (point-min) (point-max) "(cat; git diff --cached) | git apply --stat" buffer)
     (with-current-buffer buffer
+      (setq default-directory dir)
       (goto-char (point-min))
       (insert "\n")
       (while (re-search-forward "^" nil t)