Skip to content

Commit 3cf117b

Browse files
committed
Change the way we get list of commits to respect parents that might be
authored prior to their children.
1 parent 8864e86 commit 3cf117b

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/datomic/codeq/core.clj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,11 @@
358358
"Returns log as [[sha msg] ...], in commit order. commit-name may be nil
359359
or any acceptable commit name arg for git log"
360360
[commit-name]
361-
(let [commits (with-open [s (exec-stream (str "git log --pretty=oneline " commit-name))]
362-
(reverse
363-
(mapv
364-
#(vector (subs % 0 40)
365-
(subs % 41 (count %)))
366-
(line-seq s))))]
361+
(let [commits (with-open [s (exec-stream (str "git log --pretty=oneline --date-order --reverse" commit-name))]
362+
(mapv
363+
#(vector (subs % 0 40)
364+
(subs % 41 (count %)))
365+
(line-seq s)))]
367366
commits))
368367

369368
(defn unimported-commits

0 commit comments

Comments
 (0)