(diff-raw-text a b & {:keys [comparator-mode] :or {comparator-mode :default}})
Compare given RawText
instances a
and b
, returns a new org.eclipse.jgit.diff.EditList
instance
Compare given `RawText` instances `a` and `b`, returns a new `org.eclipse.jgit.diff.EditList` instance
(diff-string a b & {:keys [comparator-mode] :or {comparator-mode :default}})
Compare given strings a
and b
, returns a new org.eclipse.jgit.diff.EditList
instance
Compare given strings `a` and `b`, returns a new `org.eclipse.jgit.diff.EditList` instance
(diff-string-formatted a
b
&
{:keys [comparator-mode context-lines output-stream]
:or {comparator-mode :default
context-lines 3
output-stream (ByteArrayOutputStream.)}})
Compare given strings a
and b
and write a patch-style formatted string to given :output-stream
. Always returns
the output-stream
.
Options:
:comparator-mode Keyword that sets how whitespace changes are handled:
:ws-ignore-all
Ignores all whitespace
:ws-ignore-leading
Ignore leading whitespace
:ws-ignore-trailing
Ignores trailing whitespace
:ws-ignore-change
Ignores whitespace occurring between non-whitespace characters
:default
No special treatment
:context-lines integer
that sets the number of lines of context shown before and after a modification.
(default: 3)
:output-stream The OutputStream
instance the formatted diff is written to. Note that the returned stream is not
flushed or closed, when in doubt use with-open
.
(default: (ByteArrayOutputStream.))
Compare given strings `a` and `b` and write a patch-style formatted string to given `:output-stream`. Always returns the `output-stream`. Options: :comparator-mode Keyword that sets how whitespace changes are handled: `:ws-ignore-all` Ignores all whitespace `:ws-ignore-leading` Ignore leading whitespace `:ws-ignore-trailing` Ignores trailing whitespace `:ws-ignore-change` Ignores whitespace occurring between non-whitespace characters `:default` No special treatment :context-lines `integer` that sets the number of lines of context shown before and after a modification. (default: 3) :output-stream The `OutputStream` instance the formatted diff is written to. Note that the returned stream is not flushed or closed, when in doubt use `with-open`. (default: (ByteArrayOutputStream.))
(get-diff-formatter &
{:keys [abbreviation-length binary-file-threshold
context-lines detect-renames? monitor output-stream
path-filter quote-paths? repository]
:or {context-lines 3
repository nil
output-stream (ByteArrayOutputStream.)
binary-file-threshold 52428800
quote-paths? nil
path-filter TreeFilter/ALL
detect-renames? nil
monitor nil
abbreviation-length 7}})
Returns a new org.eclipse.jgit.diff.DiffFormatter
instance. Note that depending on the used format
method some
options are ignored, i.e. setting a prefix
or path-filter
has no effect when formatting raw-text-diffs.
Options:
:abbreviation-length integer
that sets the number of digits to show for commit-ids.
(default: 7)
:binary-file-threshold integer
that sets the maximum file size for text files, in bytes.
Files larger than this size will be assumed to be binary, even if they aren't.
(default: 52428800)
:context-lines integer
that sets the number of lines of context shown before and after a modification.
(default: 3)
:detect-renames? boolean
that sets rename detection. Ignored if repository
is not set. Once enabled the
detector can be configured away from its defaults by obtaining the instance directly by
invoking getRenameDetector()
on the formatter instance. Ignored when :repository
is nil.
(default: false)
:monitor Set a progress monitor. See JGit ProgressMonitor interface.
(default: nil)
:output-stream The OutputStream
instance the formatted diff is written to.
(default: (ByteArrayOutputStream.))
:path-filter An org.eclipse.jgit.treewalk.filter.TreeFilter
instance that limits the result, i.e.:
(PathFilter/create "project.clj")
. See org.eclipse.jgit.treewalk.filter
namespace
for all available filters or implement your own.
(default: PathFilter/ALL)
:prefix-new A purely cosmetic string
used as path prefix for the new side in the output. Can be empty
but not nil.
(default: "b/")
:prefix-old A purely cosmetic string
used as path prefix for the old side in the output. Can be empty
but not nil.
(default: "a/")
:quote-paths? boolean
that sets whether path names should be quoted. By default, the setting of
git config core.quotePath
is used. Ignored when :repository
is nil.
:repository Repository
instance the formatter can load object contents from. Once a repository has
been set, the formatter must be released to ensure the internal ObjectReader is able to
release its resources.
(default: nil)
Returns a new `org.eclipse.jgit.diff.DiffFormatter` instance. Note that depending on the used `format` method some options are ignored, i.e. setting a `prefix` or `path-filter` has no effect when formatting raw-text-diffs. Options: :abbreviation-length `integer` that sets the number of digits to show for commit-ids. (default: 7) :binary-file-threshold `integer` that sets the maximum file size for text files, in bytes. Files larger than this size will be assumed to be binary, even if they aren't. (default: 52428800) :context-lines `integer` that sets the number of lines of context shown before and after a modification. (default: 3) :detect-renames? `boolean` that sets rename detection. Ignored if `repository` is not set. Once enabled the detector can be configured away from its defaults by obtaining the instance directly by invoking `getRenameDetector()` on the formatter instance. Ignored when `:repository` is nil. (default: false) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :output-stream The `OutputStream` instance the formatted diff is written to. (default: (ByteArrayOutputStream.)) :path-filter An `org.eclipse.jgit.treewalk.filter.TreeFilter` instance that limits the result, i.e.: `(PathFilter/create "project.clj")`. See `org.eclipse.jgit.treewalk.filter` namespace for all available filters or implement your own. (default: PathFilter/ALL) :prefix-new A purely cosmetic `string` used as path prefix for the new side in the output. Can be empty but not nil. (default: "b/") :prefix-old A purely cosmetic `string` used as path prefix for the old side in the output. Can be empty but not nil. (default: "a/") :quote-paths? `boolean` that sets whether path names should be quoted. By default, the setting of `git config core.quotePath` is used. Ignored when `:repository` is nil. :repository `Repository` instance the formatter can load object contents from. Once a repository has been set, the formatter must be released to ensure the internal ObjectReader is able to release its resources. (default: nil)
(get-raw-text s)
Returns a new org.eclipse.jgit.diff.RawText
instance for given string s
Returns a new `org.eclipse.jgit.diff.RawText` instance for given string `s`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close