From 20def2fcfbff4b9cdf24ba512dda12147a5e8e11 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 7 Apr 2017 16:25:38 -0400 Subject: comment --- ...ent_1_b90f22ce0ab931658856e949ac227985._comment | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/bugs/annex_doesn__39__t_fixup_symlinks_when___34__git_commit_path__95__to__95__repo__34___is_used/comment_1_b90f22ce0ab931658856e949ac227985._comment (limited to 'doc') diff --git a/doc/bugs/annex_doesn__39__t_fixup_symlinks_when___34__git_commit_path__95__to__95__repo__34___is_used/comment_1_b90f22ce0ab931658856e949ac227985._comment b/doc/bugs/annex_doesn__39__t_fixup_symlinks_when___34__git_commit_path__95__to__95__repo__34___is_used/comment_1_b90f22ce0ab931658856e949ac227985._comment new file mode 100644 index 000000000..e5a1ac278 --- /dev/null +++ b/doc/bugs/annex_doesn__39__t_fixup_symlinks_when___34__git_commit_path__95__to__95__repo__34___is_used/comment_1_b90f22ce0ab931658856e949ac227985._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2017-04-07T20:16:45Z" + content=""" +There's nothing special about using the absolute path; "git commit ." +or "git commit thefile" will behave the same. + +This is the git false index problem. Since git commit in these situations +runs the pre-commit hook with a false index file, changes made to that +index file won't be visible after the commit. + +So, if `git annex pre-commit` fixes symlinks in this situation, +the right thing will be committed, but then the old index will have the old +symlinks staged, which will result in `git status` after the commit showing +modification to the files you just staged and committed! + +Short of having a post-commit hook come along and fix up the index to match +what was committed, I don't see anything git-annex can do better. Well, it +could prevent such commits even being made, I suppose, or warn. + +It's a pity git uses this false index file in this situation. +"""]] -- cgit v1.2.3