File: symlink_farming_commit_hook.mdwn

package info (click to toggle)
git-annex 3.20120629
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,000 kB
  • sloc: haskell: 12,228; makefile: 93; ansic: 84; perl: 37; sh: 10
file content (14 lines) | stat: -rw-r--r-- 624 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
TODO: implement below

git-annex does use a lot of symlinks. Specicially, relative symlinks,
that are checked into git. To allow you to move those around without
annoyance, git-annex can run as a post-commit hook. This way, you can `git mv`
a symlink to an annexed file, and as soon as you commit, it will be fixed
up.

`git annex init` tries to set up a post-commit hook that is itself a symlink
back to git-annex. If you want to have your own shell script in the post-commit
hook, just make it call `git annex` with no parameters. git-annex will detect
when it's run from a git hook and do the necessary fixups.

[[done]]