I’m deprecating Autosync-Magit in favour of Autosync-git.
Migrating#
I kept aliases to the previous variables and hooks such as autosync-magit-after-pull-hook to make switching to the new tool easier. autosync-git conflicts with autosync-magit due to aliases, so you can’t load both concurrently. I will eventually deprecate these aliases, so you should port your .dir-locals.el to look like:
((nil . ((autosync-git-commit-message . "My commit message")
(autosync-git-pull-timer . 300)
(mode . autosync-git))))What changed#
The new tool sheds a dependency on Magit, to just use git and Emacs’ async make-process directly. This allows it to provide its own execution buffer, instead of sharing it with Magit.
But the more exciting update is the better pull strategy, which reduces the risk of leaving conflicts in your current workspace, and does better at merging what does not conflict.
When the remote and your local branch have diverged, the pull operation starts with a “probe” stage, where autosync-git performs an in-memory 3-way merge with git merge-tree. If this 3-way merge succeeds, autosync-git does a rebase (default) or merge. rebase is now the default to keep the history as linear as possible. But you can change it to merge if you prefer.
((nil . ((autosync-git-pull-style . merge)
(mode . autosync-git))))When keeping the default rebase strategy, if a conflict occurs, it immediately aborts the rebase and informs you in *Messages*. You can also force the pull operation to leave any conflicts in the repository instead of aborting. More to discover at Autosync-git.