{"thread":{"id":"9485","subject":"[PATCH] git.el: Always set the current directory in the git-diff buffer.","startedAt":"2007-08-11T10:23:21Z","lastAt":"2007-08-11T10:23:21Z","messageCount":1,"participants":["Alexandre Julliard"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"50474","messageId":"87fy2qwesm.fsf@wine.dyndns.org","threadId":"9485","inReplyTo":null,"subject":"[PATCH] git.el: Always set the current directory in the git-diff buffer.","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2007-08-11T10:23:21Z","receivedAt":"2007-08-11T10:23:21Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"This allows jumping to the correct file with the diff-mode commands.\n\nSigned-off-by: Alexandre Julliard <julliard@winehq.org>\n---\n contrib/emacs/git.el |   10 ++++++----\n 1 files changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/emacs/git.el b/contrib/emacs/git.el\nindex 214b75c..be44e06 100644\n--- a/contrib/emacs/git.el\n+++ b/contrib/emacs/git.el\n@@ -912,10 +912,12 @@ Return the list of files that haven't been handled.\"\n \n (defun git-setup-diff-buffer (buffer)\n   \"Setup a buffer for displaying a diff.\"\n-  (with-current-buffer buffer\n-    (diff-mode)\n-    (goto-char (point-min))\n-    (setq buffer-read-only t))\n+  (let ((dir default-directory))\n+    (with-current-buffer buffer\n+      (diff-mode)\n+      (goto-char (point-min))\n+      (setq default-directory dir)\n+      (setq buffer-read-only t)))\n   (display-buffer buffer)\n   (shrink-window-if-larger-than-buffer))\n \n-- \n1.5.3.rc4.70.gf909\n\n-- \nAlexandre Julliard\njulliard@winehq.org\n"}]}