In ObjectiveGit (which is an objective c wrapper of libgit2), when I have a file conflict that is not automatically resolved (this usually means that I have a local commit and remote commit that both changed the same line of a file), then I can enumerate the conflicted file using the built in method -[GTIndex enumerateConflictedFilesWithError:usingBlock:]
. However, once I know of the conflicted file I can't figure out how to resolve it. Even if I chose to hardcode to preserve the OUR version, rather than the THEIR version, when I add it to the index using -[GTIndex addEntry:error:]
nothing appears to change in the repo and the conflict still exists. I have found that using -[GTIndex addFile:error:]
and passing the path associated with the OUR value adds the file and resolves the conflict, but it adds the file with GIT annotations such as <<<<<<<<< HEAD
that preserve the local and remote changes. These break the file.
Does anyone know how I can resolve the conflict?
The file and line in question are here: https://github.com/jeffreybergier/Hipstapaper/blob/cf1c81cdf38871ad1f5d926faeb9ea64e992f22e/Hipstapaper/Sync_shared/SyncDirectory.swift#L47
and here (same file, different line): https://github.com/jeffreybergier/Hipstapaper/blob/cf1c81cdf38871ad1f5d926faeb9ea64e992f22e/Hipstapaper/Sync_shared/SyncDirectory.swift#L102