From c64e6a0051619fadee8d568dd86a06754f18e181 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Mon, 15 Oct 2018 16:31:30 +0900 Subject: [PATCH] Fix header --- emacs.el | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/emacs.el b/emacs.el index 81dcf60..1b766d7 100644 --- a/emacs.el +++ b/emacs.el @@ -1,6 +1,6 @@ ;;; emacs.el --- 10sr emacs initialization -;; Time-stamp: <2018-10-15 16:16:46 JST 10sr> +;; Time-stamp: <2018-10-15 16:30:33 JST 10sr> ;;; Code: @@ -2305,6 +2305,7 @@ use for the buffer. It defaults to \"*recetf-show*\"." (require 'ansi-color) (defun git-walktree--open-treeish (commitish path treeish) "Open git tree buffer of TREEISH." + (cl-assert path) (let (point-tree-start (buf (git-walktree--create-buffer commitish path)) (type (git-walktree--git-plumbing "cat-file" @@ -2320,19 +2321,21 @@ use for the buffer. It defaults to \"*recetf-show*\"." (save-excursion (let ((inhibit-read-only t)) (with-temp-buffer - (when commitish - (git-walktree--call-process nil - "show" - "--no-patch" - "--color" - "--pretty=short" - commitish) - (ansi-color-apply-on-region (point-min) - (point)) - (insert "\n")) - (insert "Contents of treeish object '") - (insert treeish) - (insert "':\n") + (if commitish + (progn (git-walktree--call-process nil + "show" + "--no-patch" + "--color" + "--pretty=short" + commitish) + (ansi-color-apply-on-region (point-min) + (point)) + (insert "\n") + (insert (format "Contents of '%s:%s':\n" + commitish + path))) + (insert (format "Contents of treeish object '%s:\n" + treeish))) (setq point-tree-start (point)) (git-walktree--call-process nil "ls-tree"