From 2d341311055de31d8842cb6cc99c45ae5c8ef987 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 9 Apr 2008 18:53:41 +0200 Subject: Ensure log buffer has correct default-directory --- gitsum.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gitsum.el') 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) -- cgit 1.4.1