...
Last active
September 1, 2019 17:44
-
-
Save maio/2836cc459e33559c9ce851a7a876ff93 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn git-log-commits [s] | |
"Split standard git log output to commits" | |
(setv items (.split s "\ncommit ")) | |
(if (< (len items) 2) | |
items | |
(+ [(first items)] | |
(lfor item (rest items) f"commit {item}")))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn sh [cmd] | |
(import [subprocess [getoutput]]) | |
(getoutput cmd)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment