Skip to content

Expose conflicted entries in Index #279

Closed
@nulltoken

Description

@nulltoken

Current status:

  • Currently the Index contains fully merged staged entries (where stage = 0) and conflicted entries (where stage > 0).
  • The Count property returns the total number of entries (ie. staged + conflicted).
  • When enumerating the Index, conflicted entries are returned.
  • However, there's no way to retrieve the conflicted entries per path.

I was thinking of changing the return type of the indexer as follows

  • Current: public virtual IndexEntry this[string path]
  • Proposed: public virtual IEnumerable<IndexEntry> this[string path]

Depending on the content of the Index regarding the passed path, the output would obviously vary:

  • Fully merged: returns a sequence of one IndexEntry
  • Conflicted: returns a sequence of three IndexEntrys (Ancestor, Ours, Theirs)
  • NonExistent : returns a sequence of zero IndexEntry

Feedback? Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions