summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-27 14:33:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-27 14:33:44 -0400
commit563484e1354878df4a6877e4506af0d70e41b13e (patch)
tree119b65ec7fa76f1f6a72c25739f48bce1a58c146 /doc
parent3281a1cb19e25f964ca9b91877a194fcb216ca5d (diff)
pre-commit hook
Diffstat (limited to 'doc')
-rw-r--r--doc/git-annex.mdwn12
-rw-r--r--doc/todo/symlink_farming_commit_hook.mdwn2
-rw-r--r--doc/walkthrough.mdwn18
3 files changed, 20 insertions, 12 deletions
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 417ff7e58..f7bb64988 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -107,9 +107,13 @@ Many git-annex subcommands will stage changes for later `git commit` by you.
Fixes up symlinks that have become broken to again point to annexed content.
This is useful to run if you have been moving the symlinks around.
- You do not normally need to run this by hand since `git-annex init`
- installs a pre-commit hook that automatically fixes up symlinks when
- they are committed.
+* pre-commit [path ...]
+
+ Fixes up symlinks that are staged as part of a commit, to ensure they
+ point to annexed content.
+
+ This is meant to be called from git's pre-commit hook. `git annex init`
+ automatically creates a pre-commit hook using this.
* fromkey file
@@ -202,7 +206,7 @@ decscriptions. You may edit it.
`.git-annex/*.log` is where git-annex records its content tracking
information. These files should be committed to git.
-`.git-annex/.gitattributes` is configured to use git's union merge driver
+`.gitattributes` is configured to use git's union merge driver
to avoid conflicts when merging files in the `.git-annex` directory.
# AUTHOR
diff --git a/doc/todo/symlink_farming_commit_hook.mdwn b/doc/todo/symlink_farming_commit_hook.mdwn
index af03beb70..3e93cb34b 100644
--- a/doc/todo/symlink_farming_commit_hook.mdwn
+++ b/doc/todo/symlink_farming_commit_hook.mdwn
@@ -10,3 +10,5 @@ up.
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]]
diff --git a/doc/walkthrough.mdwn b/doc/walkthrough.mdwn
index ce68a77f7..b49a00f19 100644
--- a/doc/walkthrough.mdwn
+++ b/doc/walkthrough.mdwn
@@ -43,23 +43,25 @@ if you are using a centralized bare repository.
add debian.iso ok
# git commit -a -m added
-Notice you commit at the end, this checks in git-annex's record of the
-files but not their actual, large, content.
+When you add a file to the annex and commit it, only a symlink to
+the annexed content is committed. The content itself is stored in
+git-annex's backend.
## renaming files
# cd ~/annex
# git mv big_file my_cool_big_file
# mkdir iso
- # git mv debian.iso iso
- # git annex fix .
- fix iso/debian.iso ok
+ # git mv debian.iso iso/
# git commit -m moved
You can use any normal git operations to move files around, or even
-make copies or delete them. `git-annex fix` needs to be run if a file
-is moved into a different directory, in order to fix up the symlink
-pointing to the file's content.
+make copies or delete them.
+
+Notice that, since annexed files are represented by symlinks,
+the symlink will break when the file is moved into a subdirectory.
+But, git-annex will fix this up for you when you commit --
+it has a pre-commit hook that watches for and corrects broken symlinks.
## getting file content