summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-02-01 21:26:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-02-01 21:27:23 -0400
commitc77ac11acc10efc23acfa3d81e1deaac11cb724f (patch)
tree5d0d2b59b3a775f882e51625d64eadb804d696be /doc
parent9aecf4110afb2fb1f6b10a9a9234ad0afafda56e (diff)
unannex: Commit staged changes at end
to avoid some confusing behavior with the pre-commit hook, which would see some types of commits after an unannex as checking in of an unlocked file.
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/unannex_vs_unlock_hook_confusion.mdwn2
-rw-r--r--doc/forum/unannex_alternatives/comment_3_b1687fc8f9e7744327bbeb6f0635d1cd._comment6
-rw-r--r--doc/git-annex.mdwn11
3 files changed, 14 insertions, 5 deletions
diff --git a/doc/bugs/unannex_vs_unlock_hook_confusion.mdwn b/doc/bugs/unannex_vs_unlock_hook_confusion.mdwn
index 7e4a9f291..c03990c20 100644
--- a/doc/bugs/unannex_vs_unlock_hook_confusion.mdwn
+++ b/doc/bugs/unannex_vs_unlock_hook_confusion.mdwn
@@ -11,3 +11,5 @@ and has been re-added as a normal file, vs an unlocked file? --[[Joey||
> Hmm, not really. An unannexed file's content will have been dropped from
> the backend, but that's about the only difference. Perhaps unannex should
> just commit the removal of the file itself? --[[Joey]]
+
+> [[done]], staged changes committed at end.
diff --git a/doc/forum/unannex_alternatives/comment_3_b1687fc8f9e7744327bbeb6f0635d1cd._comment b/doc/forum/unannex_alternatives/comment_3_b1687fc8f9e7744327bbeb6f0635d1cd._comment
index 548f7aacb..9f3223578 100644
--- a/doc/forum/unannex_alternatives/comment_3_b1687fc8f9e7744327bbeb6f0635d1cd._comment
+++ b/doc/forum/unannex_alternatives/comment_3_b1687fc8f9e7744327bbeb6f0635d1cd._comment
@@ -8,5 +8,9 @@ Sorry for all the followups, but I see now that if you unannex, then add the fil
This seems to be a bug. git-annex's hook thinks that you have used git annex unlock (or \"git annex edit\") on the file and are now committing a changed version, and the right thing to do there is to add the new content to the annex and update the symlink accordingly. I'll track this bug over at [[bugs/unannex_vs_unlock_hook_confusion]].
-So, committing after unannex, and before checking the file into git in the usual way, is a workaround.
+So, committing after unannex, and before checking the file into git in the
+usual way, is a workaround. But only if you do a "git commit" to commit
+staged changes.
+
+Anyway, this confusing point is fixed in git now!
"""]]
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 83a286b0e..68a1672df 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -156,10 +156,13 @@ Many git-annex commands will stage changes for later `git commit` by you.
* unannex [path ...]
- Use this to undo an accidental add command. This is not the command you
- should use if you intentionally annexed a file and don't want its contents
- any more. In that case you should use `git annex drop` instead, and you
- can also `git rm` the file.
+ Use this to undo an accidental `git annex add` command. You can use
+ `git annex unannex` to move content out of the annex at any point,
+ even if you've already committed it.
+
+ This is not the command you should use if you intentionally annexed a
+ file and don't want its contents any more. In that case you should use
+ `git annex drop` instead, and you can also `git rm` the file.
* uninit