class Rugged::Index
def diff(*args)
marked with a single entry in the diff. If this flag is set to true,
Even if +:include_ignored+ is true, ignored directories will only be
:recurse_ignored_dirs ::
If true, file mode changes will be ignored.
:ignore_filemode ::
blob -> tree changes will be marked as typechanges.
usually be handled as a deletion of the blob. If this flag is set to true,
Even if +:include_typechange+ is true, blob -> tree changes will still
:include_typechange_trees ::
typechange records.
the "old file" and addition of the "new file", but will generate
If true, type changes for files will not be interpreted as deletion of
:include_typechange ::
file content difference is not needed.
detection. This is useful to improve performance in cases where the actual
If true, diff deltas will be generated without spending time on binary
:skip_binary_check ::
if true, untracked content will be contained in the the diff patch text.
:include_untracked_content ::
If true, filename comparisons will be made with case-insensitivity.
:deltas_are_icase ::
as fnmatch patterns.
If true, the given +:paths+ will be applied as exact matches, instead of
:disable_pathspec_match ::
all files under ignored directories will be included in the diff, too.
marked with a single entry in the diff. If this flag is set to true,
Even if +:include_untracked+ is true, untracked directories will only be
:recurse_untracked_dirs ::
If true, unmodified files will be included in the diff.
:include_unmodified ::
If true, untracked files will be included in the diff.
:include_untracked ::
If true, ignored files will be included in the diff.
:include_ignored ::
If true, the "patience diff" algorithm will be used (currenlty unimplemented).
:patience ::
if true, submodules will be excluded from the diff completely.
:ignore_submodules ::
If true, whitespace at end of line will be ignored.
:ignore_whitespace_eol ::
If true, changes in amount of whitespace will be ignored.
:ignore_whitespace_change ::
If true, all whitespace will be ignored.
:ignore_whitespace ::
If true, all files will be treated as text, disabling binary attributes & detection.
:force_text ::
If true, the sides of the diff will be reversed.
:reverse ::
will be merged into a one. The default is 0.
The maximum number of unchanged lines between hunk boundaries before the hunks
:interhunk_lines ::
to display before and after the actual changes). The default is 3.
The number of unchanged lines that define the boundary of a hunk (and
:context_lines ::
be treated as binary. The default value is 512MB.
An integer specifying the maximum byte size of a file before a it will
:max_size ::
set of files. Also see +:disable_pathspec_match+.
An array of paths / fnmatch patterns to constrain the diff to a specific
:paths ::
The following options can be passed in the +options+ Hash:
directory or the +diffable+ will be used for the "new file" side.
The index will be used as the "old file" side of the diff, while the working
+diffable+ can either be a +Rugged::Commit+ or a +Rugged::Tree+.
The second form returns a diff between the index and the given diffable object.
directory.
The first form returns a diff between the index and the current working
index.diff(diffable[, options]) -> diff
index.diff([options]) -> diff
call-seq:
def diff(*args) options = args.last.is_a?(Hash) ? args.pop : {} other = args.shift case other when nil diff_index_to_workdir options when ::Rugged::Commit diff_tree_to_index other.tree, options when ::Rugged::Tree diff_tree_to_index other, options else raise TypeError, "A Rugged::Commit or Rugged::Tree instance is required" end end
def to_s
def to_s s = "#<Rugged::Index\n" self.each do |entry| s << " [#{entry[:stage]}] '#{entry[:path]}'\n" end s + '>' end