G-Node / gin-cli

Command line client for GIN
https://gin.g-node.org
Other
12 stars 6 forks source link

Merge conflict error messages and handling #217

Closed achilleas-k closed 6 years ago

achilleas-k commented 6 years ago

This PR makes some minor changes to how merge conflicts are detected and handled on gin download.

In the latter case, conflicting files are kept in the local directory and added automatically by git annex (with a unique suffix).

achilleas-k commented 6 years ago

With the new commits, the client now checks for merge conflicts even when the download (git annex sync) command succeeds, because git-annex will return with a successful exit status (0) when it resolves a conflict by keeping both annex variants of a file. We want to catch this and return with an error to notify the user that something out of the ordinary has happened and point them to the conflicting files which require attention.

This also makes combinations of conflicts (overwrite warnings + git files conflicting, or git + annex files conflicting, etc) behave in the safest way.