{"action":"created","issue":{"url":"https://api.github.com/repos/haiwen/seafile/issues/1410","labels_url":"https://api.github.com/repos/haiwen/seafile/issues/1410/labels{/name}","comments_url":"https://api.github.com/repos/haiwen/seafile/issues/1410/comments","events_url":"https://api.github.com/repos/haiwen/seafile/issues/1410/events","html_url":"https://github.com/haiwen/seafile/issues/1410","id":112191205,"number":1410,"title":"Merge conflicts pollute file tree, discard local state, and prevent manual merging","user":{"login":"jimbo1qaz","id":913957,"avatar_url":"https://avatars.githubusercontent.com/u/913957?v=3","gravatar_id":"","url":"https://api.github.com/users/jimbo1qaz","html_url":"https://github.com/jimbo1qaz","followers_url":"https://api.github.com/users/jimbo1qaz/followers","following_url":"https://api.github.com/users/jimbo1qaz/following{/other_user}","gists_url":"https://api.github.com/users/jimbo1qaz/gists{/gist_id}","starred_url":"https://api.github.com/users/jimbo1qaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimbo1qaz/subscriptions","organizations_url":"https://api.github.com/users/jimbo1qaz/orgs","repos_url":"https://api.github.com/users/jimbo1qaz/repos","events_url":"https://api.github.com/users/jimbo1qaz/events{/privacy}","received_events_url":"https://api.github.com/users/jimbo1qaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-19T17:14:38Z","updated_at":"2016-01-04T02:33:55Z","closed_at":null,"body":"When a merge conflict is encountered, Seafile destroys the local state. Instead, it syncs down all modified files from the server and renames all conflicting local files.\r\n\r\nThis makes it completely impossible to automatically restore to the old local state, because file names have changed.\r\n\r\nIt is also very difficult to restore a client to the old server state, as the history interface discards the local branch merged in, and provides no indication of which commits are conflicts.\r\n\r\nThese bugs together make it extremely difficult to recover after a failed merge. The local state is silently destroyed upon a failed merge, and all conflict files are renamed (hundreds or thousands to fix by hand). This makes it nearly impossible to restore local state, rather than server state, after a botched merge. Doing so requires manually scanning through and renaming HUNDREDS or THOUSANDS of files by hand.\r\n\r\nThe proper solution is to push the local branch to the server, then explicitly mark the merge commit, like Git.\r\n\r\nA workaround is to push the previous local state to the server as a backup commit, while still performing a normal merge between previous server and local. This will make it possible to manually merge the two folder trees using a legitimate diff tool, rather than Seafile's butchery."},"comment":{"url":"https://api.github.com/repos/haiwen/seafile/issues/comments/168567818","html_url":"https://github.com/haiwen/seafile/issues/1410#issuecomment-168567818","issue_url":"https://api.github.com/repos/haiwen/seafile/issues/1410","id":168567818,"user":{"login":"killing","id":109284,"avatar_url":"https://avatars.githubusercontent.com/u/109284?v=3","gravatar_id":"","url":"https://api.github.com/users/killing","html_url":"https://github.com/killing","followers_url":"https://api.github.com/users/killing/followers","following_url":"https://api.github.com/users/killing/following{/other_user}","gists_url":"https://api.github.com/users/killing/gists{/gist_id}","starred_url":"https://api.github.com/users/killing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killing/subscriptions","organizations_url":"https://api.github.com/users/killing/orgs","repos_url":"https://api.github.com/users/killing/repos","events_url":"https://api.github.com/users/killing/events{/privacy}","received_events_url":"https://api.github.com/users/killing/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T02:33:55Z","updated_at":"2016-01-04T02:33:55Z","body":"Hi,\r\nThis is not a bug, but designed behavior. I don't think it will be \"fixed\" in any time."}}