Sort repositories
Upon saving, sort the repositories alphabetically by `basename'. When `-l' is provided sort before output by location.
This commit is contained in:
parent
58dcd2fa57
commit
6da8b42171
1 changed files with 7 additions and 1 deletions
|
@ -51,6 +51,12 @@ gitto [options]
|
|||
(if (not (file-exists? data-dir))
|
||||
(mkdir data-dir))
|
||||
|
||||
;; Sort first
|
||||
(set! repositories
|
||||
(sort repositories
|
||||
(lambda (s1 s2)
|
||||
(string<? (basename s1) (basename s2)))))
|
||||
|
||||
(let ((port (open-output-file repositories-file)))
|
||||
(write repositories port)
|
||||
(close-port port)))
|
||||
|
@ -114,7 +120,7 @@ gitto [options]
|
|||
(for-each (lambda (repo)
|
||||
(display repo)
|
||||
(newline))
|
||||
repositories))
|
||||
(sort repositories string<?)))
|
||||
|
||||
(define option-spec
|
||||
`((version (single-char #\v))
|
||||
|
|
Loading…
Reference in a new issue