print
Iterate over a diff generating formatted text output.
Signature
ts
class Diff {
print(options?: DiffPrintOptions | null): string;
}
Parameters
- optionsnull | DiffPrintOptions
Print options for diff.
- formatDiffFormat
Possible output formats for diff data.
-Patch
: Fullgit diff
(default)
-PatchHeader
: Just the headers of the patch
-Raw
: Likegit diff --raw
the headers of the patch
-NameOnly
: Likegit diff --name-only
-NameStatus
: Likegit diff --name-status
-PatchId
:git diff
as used bygit patch-id
- formatDiffFormat
Returns
- string
Formatted text output.