git-annex/Command
Joey Hess 2b97f5381a add tweak-fetch command, for use in the tweak-fetch hook
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.
2011-12-26 14:25:37 -04:00
..
Add.hs add: If interrupted, add can leave files converted to symlinks but not yet added to git. Running the add again will now clean up this situtation. 2011-12-07 16:53:53 -04:00
AddUrl.hs remove leftover debug print 2011-12-15 13:12:17 -04:00
ConfigList.hs clean up read/show abuse 2011-11-08 00:17:54 -04:00
Copy.hs better limiting of start actions to only run whenAnnexed 2011-11-10 23:45:14 -04:00
Dead.hs add 2011-12-02 19:22:43 -04:00
Describe.hs lint 2011-11-11 01:52:58 -04:00
Drop.hs factor out a stopUnless 2011-12-09 12:23:45 -04:00
DropKey.hs inverted logic 2011-12-09 13:38:28 -04:00
DropUnused.hs some work on avoiding partial functions 2011-12-09 18:10:41 -04:00
Find.hs reorder less expensive terminal first 2011-12-23 13:19:28 -04:00
Fix.hs factor out a stopUnless 2011-12-09 12:23:45 -04:00
FromKey.hs lint 2011-11-11 01:52:58 -04:00
Fsck.hs add support for using hashDirLower in addition to hashDirMixed 2011-11-28 22:43:51 -04:00
Get.hs factor out a stopUnless 2011-12-09 12:23:45 -04:00
InAnnex.hs safer inannex checking 2011-11-09 18:33:15 -04:00
Init.hs init: When run in an already initalized repository, and without a description specified, don't delete the old description. 2011-11-12 15:42:52 -04:00
InitRemote.hs more partial function removal 2011-12-15 18:19:36 -04:00
Lock.hs clean up check selection code 2011-10-29 15:19:05 -04:00
Map.hs map: --fast disables use of dot to display map 2011-12-20 16:42:35 -04:00
Merge.hs clean up check selection code 2011-10-29 15:19:05 -04:00
Migrate.hs more partial function removal 2011-12-15 18:19:36 -04:00
Move.hs inverted logic 2011-12-09 13:38:28 -04:00
PreCommit.hs better limiting of start actions to only run whenAnnexed 2011-11-10 23:45:14 -04:00
RecvKey.hs clean up check selection code 2011-10-29 15:19:05 -04:00
Reinject.hs add back message 2011-12-16 16:56:31 -04:00
Semitrust.hs clean up check selection code 2011-10-29 15:19:05 -04:00
SendKey.hs add support for using hashDirLower in addition to hashDirMixed 2011-11-28 22:43:51 -04:00
Status.hs more partial function removal 2011-12-15 18:19:36 -04:00
Sync.hs more partial function removal 2011-12-15 18:19:36 -04:00
Trust.hs clean up check selection code 2011-10-29 15:19:05 -04:00
TweakFetch.hs add tweak-fetch command, for use in the tweak-fetch hook 2011-12-26 14:25:37 -04:00
Unannex.hs improve output 2011-12-22 14:50:20 -04:00
Uninit.hs more partial function removal 2011-12-15 18:19:36 -04:00
Unlock.hs add support for using hashDirLower in addition to hashDirMixed 2011-11-28 22:43:51 -04:00
Untrust.hs clean up check selection code 2011-10-29 15:19:05 -04:00
Unused.hs more partial function removal 2011-12-15 18:19:36 -04:00
Upgrade.hs clean up check selection code 2011-10-29 15:19:05 -04:00
Version.hs When not run in a git repository, git-annex can still display a usage message, and "git annex version" even works. 2011-11-16 00:49:09 -04:00
Whereis.hs better limiting of start actions to only run whenAnnexed 2011-11-10 23:45:14 -04:00