diff --git a/CHANGELOG b/CHANGELOG index 201726b428..1d8ce603a5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,8 @@ git-annex (8.20200227) UNRELEASED; urgency=medium * Fix regression that prevented external special remotes from using GETCONFIG to query values like "name". (Introduced in version 7.20200202.7.) + * Fix bug that caused unlocked annexed dotfiles to be added to git by the + smudge filter when annex.dotfiles was not set. * Improve behavior when a directory git-annex is writing to gets unmounted. Previously it could in some cases re-create the mount point and directory tree, and even write object contents to the wrong disk. diff --git a/Command/Smudge.hs b/Command/Smudge.hs index 10ed0ae963..6b20ad3fee 100644 --- a/Command/Smudge.hs +++ b/Command/Smudge.hs @@ -176,7 +176,7 @@ shouldAnnex file indexmeta moldkey = ifM (annexGitAddToAnnex <$> Annex.getGitCon checkmatcher d | dotfile file = ifM (getGitConfigVal annexDotFiles) ( go - , return False + , d ) | otherwise = go where diff --git a/doc/bugs/Guard_against_previously_annexed_dotfiles_being_converted_to_git_files__63__.mdwn b/doc/bugs/Guard_against_previously_annexed_dotfiles_being_converted_to_git_files__63__.mdwn index ab90679830..997911284b 100644 --- a/doc/bugs/Guard_against_previously_annexed_dotfiles_being_converted_to_git_files__63__.mdwn +++ b/doc/bugs/Guard_against_previously_annexed_dotfiles_being_converted_to_git_files__63__.mdwn @@ -64,3 +64,5 @@ index 3de500c..7898192 100644 [[!meta author=kyle]] [[!tag projects/datalad]] + +> [[fixed|done]] --[[Joey]] diff --git a/doc/bugs/Guard_against_previously_annexed_dotfiles_being_converted_to_git_files__63__/comment_2_5d0e1468f7ab2e8cd42452812d9ce49b._comment b/doc/bugs/Guard_against_previously_annexed_dotfiles_being_converted_to_git_files__63__/comment_2_5d0e1468f7ab2e8cd42452812d9ce49b._comment new file mode 100644 index 0000000000..fe8e9befa0 --- /dev/null +++ b/doc/bugs/Guard_against_previously_annexed_dotfiles_being_converted_to_git_files__63__/comment_2_5d0e1468f7ab2e8cd42452812d9ce49b._comment @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2020-03-09T18:07:12Z" + content=""" +Analysis: Command.Smudge.shouldAnnex was changed +in [[!commit 3cd375723658398a4b15ff8ec19e562ec4622488]] to check, for dotfiles, +if annex.dotfiles is set. If not, it always returns False, so the file +always gets added to git when it's smudged. + +After getting a file, git-annex tells git to update its index, which +smudges the file. Of course, there are also plenty of other things that can +cause a file to be smudged. + +Bad. Fix is very easy, luckily. It just needs to, rather than returning +False, checking if the file was annexed, same as is done for non-dotfiles. +"""]]