about summary refs log tree commit diff
path: root/gitsum.el
diff options
context:
space:
mode:
Diffstat (limited to 'gitsum.el')
-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)