diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-04-14 13:07:46 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-04-14 13:07:46 -0400 |
commit | 1835f915174e9fdf5aa73372efa80e4330b528f2 (patch) | |
tree | df3921a3a857b18d976512b556de5360be686df2 | |
parent | 648b41ab69475e1973651a35c64b4eadf7a97ec7 (diff) |
fix bug in unlocked file scanner that skipped over executable unlocked files
4 files changed, 27 insertions, 1 deletions
diff --git a/Database/Keys.hs b/Database/Keys.hs index 246ccd191..ed3878161 100644 --- a/Database/Keys.hs +++ b/Database/Keys.hs @@ -170,7 +170,10 @@ scanAssociatedFiles = whenM (isJust <$> inRepo Git.Branch.current) $ dropallassociated h = liftIO $ flip SQL.queueDb h $ delete $ from $ \(_r :: SqlExpr (Entity SQL.Associated)) -> return () - isregfile i = Git.Types.toBlobType (Git.LsTree.mode i) == Just Git.Types.FileBlob + isregfile i = case Git.Types.toBlobType (Git.LsTree.mode i) of + Just Git.Types.FileBlob -> True + Just Git.Types.ExecutableBlob -> True + _ -> False add h i k = liftIO $ flip SQL.queueDb h $ void $ insertUnique $ SQL.Associated (toIKey k) diff --git a/debian/changelog b/debian/changelog index de83ad34d..aa1deb3e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ git-annex (6.20160413) UNRELEASED; urgency=medium treat such a $HOME git repository as a git-annex repository. * webapp: Update url to add gitlab.com ssh key. (Psst GitLab.. cool urls don't change!) + * Fix bug in v6 mode that prevented treating unlocked executable files + as annexed. If you have such files, run git annex init --version=6 + to update the cache after upgrading to this version of git-annex. -- Joey Hess <id@joeyh.name> Wed, 13 Apr 2016 13:30:32 -0400 diff --git a/doc/bugs/v6_repo_can_not_restore_files_with_executable_permission.mdwn b/doc/bugs/v6_repo_can_not_restore_files_with_executable_permission.mdwn index 8dd618824..e089b1591 100644 --- a/doc/bugs/v6_repo_can_not_restore_files_with_executable_permission.mdwn +++ b/doc/bugs/v6_repo_can_not_restore_files_with_executable_permission.mdwn @@ -90,3 +90,4 @@ total 116 ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) +> [[fixed|done]] diff --git a/doc/bugs/v6_repo_can_not_restore_files_with_executable_permission/comment_2_3670842c476af9b48ef37adab74a0a9d._comment b/doc/bugs/v6_repo_can_not_restore_files_with_executable_permission/comment_2_3670842c476af9b48ef37adab74a0a9d._comment new file mode 100644 index 000000000..6676a4f6c --- /dev/null +++ b/doc/bugs/v6_repo_can_not_restore_files_with_executable_permission/comment_2_3670842c476af9b48ef37adab74a0a9d._comment @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2016-04-14T16:59:40Z" + content=""" +I've fixed this bug. After upgrading to git-annex 6.20160414 or newer, +if you have such files in your repository, you will need to force git-annex +to update its list of unlocked files, by running: + + git annex init --version=6 + +You may also need to run `git annex fsck` on the files to properly populate +them with their content. Do it after the above command. + +(There were also some bugs that lost the execute bit; fixed those too.) + +(The comment about windows is not about this bug at all, but an entirely +different, and already fixed bug.) +"""]] |