Browse Source

Fixes issue with .soloignore not getting committed

master
sloum 2 months ago
parent
commit
c210e92a53
  1. 11
      solo

11
solo

@ -42,8 +42,7 @@
(close (file-create "HEADS"))
(mkdir "snapshots" 0775)
(mkdir "refs" 0775)
(mkdir "refs/tags" 0775)
(define repo-config (file-create "solo-config"))))
(mkdir "refs/tags" 0775)))
;;;
;;; Entry point to `solo log`
@ -277,7 +276,7 @@
(define out [])
(define ignore (solo-get-ignored))
(for-each (lambda (p)
(if (and (not (path-is-dir? p)) (not (member? ignore p)) (not (regex-match? "\\.solo" p)))
(if (and (not (path-is-dir? p)) (not (member? ignore p)) (not (regex-match? "\\.solo[^i]" p)))
(set! out (append out p))))
(path-glob (path-join root-dir "**")))
out))
@ -316,7 +315,7 @@
(define first-list (filter (lambda (p) (not (equal? (path-base p) ".commit"))) (path-glob (path-join first-path "**"))))
(set! first-list (map (lambda (p) (slice p (+ (length first-path) 1))) first-list))
(define second-list (map (lambda (p) (slice p (+ (length second-path) 1))) (path-glob (path-join second-path "**"))))
(set! second-list (filter (lambda (p) (not (or (equal? (slice p 0 5) ".solo") (member? ignored p) (equal? p "") (equal? p ".commit")))) second-list))
(set! second-list (filter (lambda (p) (not (or (equal? (slice p 0 6) ".solo/") (member? ignored p) (equal? p "") (equal? p ".commit")))) second-list))
(define out (map (lambda (p)
(cond
@ -369,10 +368,10 @@
(if (path-exists? (path-join (pwd) ".soloignore"))
(begin
(define files (string->list (open-read-close (path-join (pwd) ".soloignore")) "\n"))
(define out [(path-join (pwd) ".soloignore")])
(define out [])
(for-each (lambda (ln) (set! out (list-join out (path-glob (path-abs ln))))) (filter (lambda (l) (~bool l)) files))
out)
#f)))
[])))
(define open-read-close (lambda (path)
(define f (file-open-read path))

Loading…
Cancel
Save