diff options
author | Mathieu Othacehe <[email protected]> | 2019-11-16 09:34:27 +0100 |
---|---|---|
committer | Mathieu Othacehe <[email protected]> | 2019-11-16 09:34:27 +0100 |
commit | 154d97abdd16674fdebc763351f661bbcdc869a4 (patch) | |
tree | 0277a9380edd1390f16e432283d32499ffed36d1 /gnu/packages/patches/emacs-magit-log-format-author-margin.patch | |
parent | e4696c69d75f4fcf54c42beeb928032726bdaf7d (diff) | |
parent | 87e7faa2ae641d8302efc8b90f1e45f43f67f6da (diff) |
Merge remote-tracking branch master into core-updates
Diffstat (limited to 'gnu/packages/patches/emacs-magit-log-format-author-margin.patch')
-rw-r--r-- | gnu/packages/patches/emacs-magit-log-format-author-margin.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/gnu/packages/patches/emacs-magit-log-format-author-margin.patch b/gnu/packages/patches/emacs-magit-log-format-author-margin.patch new file mode 100644 index 0000000000..fc52157a32 --- /dev/null +++ b/gnu/packages/patches/emacs-magit-log-format-author-margin.patch @@ -0,0 +1,72 @@ +From 94914ca4690c0cff12d600a0c8ba6bfb3fb38dc5 Mon Sep 17 00:00:00 2001 +From: Jonas Bernoulli <[email protected]> +Date: Tue, 25 Jun 2019 21:44:32 +0200 +Subject: [PATCH] magit-log-format-author-margin: New function + +Split it from `magit-log-format-margin'. +--- + lisp/magit-log.el | 48 +++++++++++++++++++++++++---------------------- + 1 file changed, 26 insertions(+), 22 deletions(-) + +diff --git a/lisp/magit-log.el b/lisp/magit-log.el +index c8e6ef63..c0a79b19 100644 +--- a/lisp/magit-log.el ++++ b/lisp/magit-log.el +@@ -1374,28 +1374,32 @@ The shortstat style is experimental and rather slow." + (when-let ((option (magit-margin-option))) + (if magit-log-margin-show-shortstat + (magit-log-format-shortstat-margin rev) +- (pcase-let ((`(,_ ,style ,width ,details ,details-width) +- (or magit-buffer-margin +- (symbol-value option)))) +- (magit-make-margin-overlay +- (concat (and details +- (concat (propertize (truncate-string-to-width +- (or author "") +- details-width +- nil ?\s (make-string 1 magit-ellipsis)) +- 'face 'magit-log-author) +- " ")) +- (propertize +- (if (stringp style) +- (format-time-string +- style +- (seconds-to-time (string-to-number date))) +- (pcase-let* ((abbr (eq style 'age-abbreviated)) +- (`(,cnt ,unit) (magit--age date abbr))) +- (format (format (if abbr "%%2i%%-%ic" "%%2i %%-%is") +- (- width (if details (1+ details-width) 0))) +- cnt unit))) +- 'face 'magit-log-date))))))) ++ (magit-log-format-author-margin author date)))) ++ ++(defun magit-log-format-author-margin (author date &optional previous-line) ++ (pcase-let ((`(,_ ,style ,width ,details ,details-width) ++ (or magit-buffer-margin ++ (symbol-value option)))) ++ (magit-make-margin-overlay ++ (concat (and details ++ (concat (propertize (truncate-string-to-width ++ (or author "") ++ details-width ++ nil ?\s (make-string 1 magit-ellipsis)) ++ 'face 'magit-log-author) ++ " ")) ++ (propertize ++ (if (stringp style) ++ (format-time-string ++ style ++ (seconds-to-time (string-to-number date))) ++ (pcase-let* ((abbr (eq style 'age-abbreviated)) ++ (`(,cnt ,unit) (magit--age date abbr))) ++ (format (format (if abbr "%%2i%%-%ic" "%%2i %%-%is") ++ (- width (if details (1+ details-width) 0))) ++ cnt unit))) ++ 'face 'magit-log-date)) ++ previous-line))) + + (defun magit-log-format-shortstat-margin (rev) + (magit-make-margin-overlay +-- +2.23.0 + |