emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/why-this 7f1ae28159 36/59: Fix Git backend


From: ELPA Syncer
Subject: [nongnu] elpa/why-this 7f1ae28159 36/59: Fix Git backend
Date: Sun, 27 Nov 2022 16:02:52 -0500 (EST)

branch: elpa/why-this
commit 7f1ae28159e3c94f475152ebd3cd282775c22862
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Fix Git backend
---
 why-this.el | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/why-this.el b/why-this.el
index 17ccf9558c..aa7fbcbff2 100644
--- a/why-this.el
+++ b/why-this.el
@@ -705,7 +705,7 @@ Do CMD with ARGS."
                              "git rev-parse --is-inside-work-tree"))))
     ('line-data
      (when (> (- (nth 1 args) (nth 0 args)) 0)
-       (let* ((command (let ((temp-file
+       (let* ((blame (let ((temp-file
                               (let ((file (make-temp-file "why-this-git-"))
                                     (text (buffer-substring-no-properties
                                            (point-min) (point-max))))
@@ -713,16 +713,17 @@ Do CMD with ARGS."
                                   (insert text))
                                 file)))
                          (unwind-protect
-                             (format (concat
-                                      "git blame -L %i,%i \"%s\""
-                                      " --porcelain --contents \"%s\""
-                                      " ; echo $?")
-                                     (nth 0 args) (1- (nth 1 args))
-                                     (buffer-file-name) temp-file)
+                             (butlast
+                              (split-string
+                               (shell-command-to-string
+                                (format (concat
+                                         "git blame -L %i,%i \"%s\""
+                                         " --porcelain --contents \"%s\""
+                                         " ; echo $?")
+                                        (nth 0 args) (1- (nth 1 args))
+                                        (buffer-file-name) temp-file))
+                               "\n"))
                            (delete-file temp-file))))
-              (blame (butlast
-                      (split-string (shell-command-to-string command)
-                       "\n")))
               (status (string-to-number (car (last blame))))
               line-data
               (i 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]