From 82d994364380bd528ef5465a081e0e9964d5daa5 Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Tue, 15 Jun 2010 13:36:16 +0100 Subject: [PATCH] Stop diffless commits tricking magit into an infinite loop. --- magit.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/magit.el b/magit.el index 49454adf..55b2ba31 100644 --- a/magit.el +++ b/magit.el @@ -2318,9 +2318,9 @@ insert a line to tell how to insert more of them" (when (looking-at "^commit \\([0-9a-fA-F]\\{40\\}\\)") (add-text-properties (match-beginning 1) (match-end 1) '(face magit-log-sha1))) - (search-forward-regexp "^diff" nil t) - (goto-char (match-beginning 0)) - (magit-wash-diffs)) + (when (search-forward-regexp "^diff" nil t) + (goto-char (match-beginning 0)) + (magit-wash-diffs))) (defun magit-refresh-commit-buffer (commit) (magit-create-buffer-sections