2b97f5381a
tweak-fetch is a new git hook I have developed (not yet accepted into git, but looking bright). Amoung other things, the hook can be used to observe what is being fetched, notice remote git-annex branches that might be updated, and merge them into the git-annex branch. This will solve problems where users do a git pull, immediately followed by a push, and it refuses to push because their git-annex branch is diverged, and they neither ran git annex merge by hand, nor ran other git-annex commands that auto-merge. The tweak-fetch is written by git annex init. Of course, existing repositories won't have it, which is ok, because git-annex still automatically does a merge if changed branches have appeared. Indeed, it will always need to do that check, as long as it needs to support support git-annex branches that might be updated by other means. Eventually though, I will want to ensure all repositories have the tweak-fetch hook. Perhaps a minor verison upgrade to ensure it is added? A subtlety of the hook is that when it's run, the remote tracking refs have not yet been updated. So Annex.Branch.updateTo has to be careful to only use the sha1 that was fetched, not the branch name. The branch name is only used in the commit message. The other tricky thing is that git tweak-fetch hook should *only* output lines in a specific format, and git will be unhappy if it also outputs status messages, etc. So those messages are sent to stderr. |
||
---|---|---|
.. | ||
Branch.hs | ||
BranchState.hs | ||
CatFile.hs | ||
Content.hs | ||
Exception.hs | ||
Journal.hs | ||
Queue.hs | ||
Ssh.hs | ||
UUID.hs | ||
Version.hs |