Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Writing conflicting git_merge_trees result index? #1567

@suskin

Description

@suskin

Hey guys,

I'm working on implementing a pull-like operation which, on encountering merge conflicts, always writes THEIRS and OURS files to disk for the user to use to resolve the conflicts. After an attempted merge, I'd like to be able to easily record which files are conflicting so that it's easy to complete the merge after the user has intervened, similar to how git handles this situation. What is the recommended way of doing this?

I was expecting to be able to write the result from git_merge_trees to disk to accomplish this, but passing it to git_index_write_tree_to fails because it won't write an index to disk if it contains conflicts. Should I be modifying the index in some fashion before writing it out, or is there another approach I should take?

Thanks for the help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions