Liking cljdoc? Tell your friends :D

lucid.git.api.difference


edit->changeclj

(edit->change edit)

helper function for format-change

helper function for `format-change`
raw docstring

enum->keywordclj

(enum->keyword enum)

converts an enum to a keyword

(enum->keyword Constants/ATTR_FILTER) => :filter

(enum->keyword Constants/CHARSET) => :utf-8

converts an enum to a keyword

(enum->keyword Constants/ATTR_FILTER)
=> :filter

(enum->keyword Constants/CHARSET)
=> :utf-8
raw docstring

format-changeclj

(format-change repo edit old-id new-id)

helper function for format-changes

helper function for `format-changes`
raw docstring

format-changesclj

(format-changes repo entry old-id new-id)

helper function for format-entry

helper function for `format-entry`
raw docstring

format-entryclj

(format-entry repo entry)

formats the entry returned by git-diff (->> (git-diff (repo/repository) {:commit "HEAD~3"} {}) first (format-entry (repo/repository))) ;; => #modify {:new-id "c81c8f4e14c252adecd1d983ce161055d253c62e", ;; :old-id "356a16f27cd0e66d5d1950252bd6ae57851881a0", ;; :new-path "project.clj", ;; :old-path "project.clj", ;; :changes [#replace {:old [50 51], ;; :new [50 51]} ;; #delete {:old [121 122], ;; :new [121 121]} ;; #replace {:old [127 128], ;; :new [126 127]}]}

formats the entry returned by `git-diff`
(->> (git-diff (repo/repository)
               {:commit "HEAD~3"}
               {})
     first
     (format-entry (repo/repository)))
;; => #modify {:new-id "c81c8f4e14c252adecd1d983ce161055d253c62e",
;;             :old-id "356a16f27cd0e66d5d1950252bd6ae57851881a0",
;;             :new-path "project.clj",
;;             :old-path "project.clj",
;;             :changes [#replace {:old [50 51],
;;                                 :new [50 51]}
;;                       #delete {:old [121 122],
;;                                :new [121 121]}
;;                       #replace {:old [127 128],
;;                                 :new [126 127]}]}
raw docstring

git-diffclj

(git-diff repo old new)

returns the raw diff object (-> (git-diff (repo/repository) {:commit "HEAD~3"} {}) first) ;; => #entry{:change-type "MODIFY", ;; :new-id "c81c8f4e14c252adecd1d983ce161055d253c62e", ;; :new-mode "100644", ;; :new-path "project.clj", ;; :old-id "356a16f27cd0e66d5d1950252bd6ae57851881a0", ;; :old-mode "100644", ;; :old-path "project.clj", ;; :score 0, ;; :tree-filter-marks 0}

returns the raw diff object
(-> (git-diff (repo/repository)
              {:commit "HEAD~3"}
              {})
    first)
;; => #entry{:change-type "MODIFY",
;;           :new-id "c81c8f4e14c252adecd1d983ce161055d253c62e",
;;           :new-mode "100644",
;;           :new-path "project.clj",
;;           :old-id "356a16f27cd0e66d5d1950252bd6ae57851881a0",
;;           :old-mode "100644",
;;           :old-path "project.clj",
;;           :score 0,
;;           :tree-filter-marks 0}
raw docstring

list-differenceclj

(list-difference repo old)
(list-difference repo old new)

returns a list of modifications from one version to another (-> (list-difference (repo/repository) {:commit "HEAD~3"}) first) ;; => #modify {:new-id "c81c8f4e14c252adecd1d983ce161055d253c62e", ;; :old-id "356a16f27cd0e66d5d1950252bd6ae57851881a0", ;; :new-path "project.clj", ;; :old-path "project.clj", ;; :changes [#replace {:old [50 51], :new [50 51]} ;; #delete {:old [121 122], :new [121 121]} ;; #replace {:old [127 128], :new [126 127]}]}

returns a list of modifications from one version to another
(-> (list-difference (repo/repository)
                     {:commit "HEAD~3"})
    first)
;; => #modify {:new-id "c81c8f4e14c252adecd1d983ce161055d253c62e",
;;             :old-id "356a16f27cd0e66d5d1950252bd6ae57851881a0",
;;             :new-path "project.clj",
;;             :old-path "project.clj",
;;             :changes [#replace {:old [50 51], :new [50 51]}
;;                       #delete {:old [121 122], :new [121 121]}
;;                       #replace {:old [127 128], :new [126 127]}]}
raw docstring

list-file-changesclj

(list-file-changes repo old)
(list-file-changes repo old new)

lists file changes between the previous and current repositories

(list-file-changes (repo/repository) {:commit "HEAD~3"}) ;; => ({:path "project.clj", :type :modify} ;; {:path "test/lucid/distribute/manifest/graph/external_test.clj", :type :modify} ;; {:path "test/lucid/system/jvm_test.clj", :type :modify})

lists file changes between the previous and current repositories

(list-file-changes (repo/repository)
                   {:commit "HEAD~3"})
;; => ({:path "project.clj", :type :modify}
;;     {:path "test/lucid/distribute/manifest/graph/external_test.clj", :type :modify}
;;     {:path "test/lucid/system/jvm_test.clj", :type :modify})
raw docstring

null-idclj


retrieve-textclj

(retrieve-text repo id start end)

retrieve texts from given lines of a blob

(retrieve-text (repo/repository) (AbbreviatedObjectId/fromString "c81c8f4e14c252adecd1d983ce161055d253c62e") 0 1) ;;=> ("(defproject zcaudate/lucid "1.4.5"
")

retrieve texts from given lines of a blob 
 
   (retrieve-text (repo/repository)
                  (AbbreviatedObjectId/fromString "c81c8f4e14c252adecd1d983ce161055d253c62e")
                  0
                  1)
   ;;=> ("(defproject zcaudate/lucid \"1.4.5\"\
")
  
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close