| com.atlassian.bitbucket.scm.git.command.diff.GitDiffBuilder |
Extends the diff-core builder with options specific to git diff.
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the number of context lines which should be included in the
git diff output. | |||||||||||
Restores the default number of context lines.
| |||||||||||
Sets the prefix to be used by git when outputing the destination path in a diff header.
| |||||||||||
Sets the prefix to be used by git when outputing the source path in a diff header.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.bitbucket.scm.CommandBuilderSupport
| |||||||||||
From interface
com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
| |||||||||||
From interface
com.atlassian.bitbucket.scm.git.command.diff.GitDiffCoreBuilder
| |||||||||||
Sets the number of context lines which should be included in the git diff output. By default, git uses
3 lines. The provided value must be greater than or equal to 0, since a negative number of context lines
has no meaning. defaultContextLines() can be called to restore the default after using a custom value.
| value | the number of context lines to include in the diff output, 0 or higher |
|---|
this| IllegalArgumentException | if the provided value is negative |
|---|
Sets the prefix to be used by git when outputing the destination path in a diff header. The default used by git
is "b/".
Changing this value controls both the
diff --git a/file.txt b/file.txt
index 05feec6..898a7b8 100644
--- a/file.txt
+++ b/file.txt
b/file.txt in the diff --git header and the +++
path after the index details.
| value | the prefix to display before the destination path, may be empty or null to use the default |
|---|
this
Sets the prefix to be used by git when outputing the source path in a diff header. The default used by git is
"a/".
Changing this value controls both the
diff --git a/file.txt b/file.txt
index 05feec6..898a7b8 100644
--- a/file.txt
+++ b/file.txt
a/file.txt in the diff --git header and the ---
path after the index details.
| value | the prefix to display before the source path, may be empty or null to use the default |
|---|
this
| value | an optional flag to ignore whitespace in the diff |
|---|
this| NullPointerException | if the provided value is null
|
|---|