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

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

[elpa] externals/gited e8f116d 02/73: Default to beginning of epoch when


From: Stefan Monnier
Subject: [elpa] externals/gited e8f116d 02/73: Default to beginning of epoch when no commit time info
Date: Sun, 29 Nov 2020 00:00:27 -0500 (EST)

branch: externals/gited
commit e8f116d5a88017b97a4ed1451b953ea0fd6104fb
Author: Tino Calancha <tino.calancha@gmail.com>
Commit: Tino Calancha <tino.calancha@gmail.com>

    Default to beginning of epoch when no commit time info
    
    Default to '1970-01-01 00:00' (a string) when commit time is not available.
    This fixes gited-list-branches when pattern is "tags".
    * gited.el (gited--fill-branch-alist): Commit time in `gited-branch-alist' 
must
    be an string.
---
 gited.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/gited.el b/gited.el
index 4927571..86e2eb4 100644
--- a/gited.el
+++ b/gited.el
@@ -10,9 +10,9 @@
 ;; Compatibility: GNU Emacs: 24.4
 ;; Version: 0.2.0
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Fri Jun 02 09:30:00 JST 2017
+;; Last-Updated: Fri Jun 02 11:10:51 JST 2017
 ;;           By: calancha
-;;     Update #: 634
+;;     Update #: 635
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
@@ -2411,14 +2411,13 @@ reach the beginning of the buffer."
               (error "No Git repository in current directory"))
             (insert ")")
             (mapcar (lambda (x)
-                      (when (stringp (car x)) ; No time: set it to beginning
-                                              ; of epoch.
-                        (push 0 x))
+                      (when (stringp (car x)) ; No time: set it to beginning 
of epoch.
+                        (push "1970-01-01 00:00" x))
                       (when (= (length x) 4) ; Group time an time zone within 
alist.
                         (setf (car x) (cons (car x) (cadr x)))
                         (setf (cdr x) (cddr x)))
                       (when (and (stringp (car (last x))) ; If no Author, set
-                                                          ; it Unknown.
+                                        ; it Unknown.
                                  (string= "" (car (last x))))
                         (setf (car (last x)) "Unknown"))
                       x)
@@ -2438,8 +2437,8 @@ reach the beginning of the buffer."
                                         ;; FIXME: Would work for  a zone as: 
+0530 ?
                                         (and zone (* 36 zone)))) 
                                       (t ;; HACK: Workaround for Emacs 
versions < 25 that don't accept
-                                         ;; ZONE arg in functions like 
`decode-time';
-                                         ;; or `format-time-string', where 
ZONE has less general meaning.
+                                       ;; ZONE arg in functions like 
`decode-time';
+                                       ;; or `format-time-string', where ZONE 
has less general meaning.
                                        (let ((time (decode-time
                                                     (seconds-to-time 
time-secs)))
                                              (gited-date-format
@@ -2486,7 +2485,8 @@ reach the beginning of the buffer."
                                                         (current-buffer) nil)
                                      (buffer-string))))
                          ;; Format time in seconds as `gited-date-format'.
-                         (setf (car entry) (format-time-fn (caar entry) (cdar 
entry)))
+                         (when (consp (car entry))
+                           (setf (car entry) (format-time-fn (caar entry) 
(cdar entry))))
                          (append `(,(1+ idx)) (get-mark-fn entry)
                                  entry `(,str)))))))
     (progress-reporter-done prep)



reply via email to

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