summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-07-12 13:12:30 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-07-12 13:12:30 -0400
commitddd1316779835b00197f8ee7a820e1129b58f408 (patch)
treea4dc5980b884d8eb68086dbf50143f5af31c8802
parent174c6081818b7ba9de4b3685487809aa4aaa9932 (diff)
why this cannot be fixed in v5 mode
-rw-r--r--doc/bugs/unannex__58___Cannot_proceed_with_uncommitted_changes_staged_in_the_index/comment_1_1c0cad1076d5d4d908b8297e7c13ea33._comment32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/bugs/unannex__58___Cannot_proceed_with_uncommitted_changes_staged_in_the_index/comment_1_1c0cad1076d5d4d908b8297e7c13ea33._comment b/doc/bugs/unannex__58___Cannot_proceed_with_uncommitted_changes_staged_in_the_index/comment_1_1c0cad1076d5d4d908b8297e7c13ea33._comment
new file mode 100644
index 000000000..4b54996eb
--- /dev/null
+++ b/doc/bugs/unannex__58___Cannot_proceed_with_uncommitted_changes_staged_in_the_index/comment_1_1c0cad1076d5d4d908b8297e7c13ea33._comment
@@ -0,0 +1,32 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-07-12T16:23:51Z"
+ content="""
+In v5 mode, there is a complex interaction between unannex and the
+pre-commit hook. An unannexed file looks quite a lot like an unlocked file,
+so the pre-commit hook is prone to want to lock it, and so add it back to
+the annex as an annexed file.
+
+To avoid that problem, unannex needs to commit the unannexing of the
+files.
+
+However, if you have other staged changes, they'll also be included in that
+commit. Which would be a bug if it were allowed to happen. This is why
+it checks for a clean index first.
+
+It would be possible to improve the behavior by explicitly committing only
+the files that got unannexed, rather than all staged changes. Why didn't I
+do that?
+
+Well, `git commit $file` stages any changes to the file's content before
+committing. When the file has been unannexed, this stages the entire large
+file content into git, and adds it back. Not the desired behavior!
+
+Git in fact has no interface to make it commit only staged changes to
+only specific files. I can't get there from here. It would certianly
+be nice if git got the ability to do that, if someone wants a project to
+improve git.
+
+It's very nice that v6 mode avoids this problem entirely!
+"""]]