Fix bug that caused unlocked annexed dotfiles to be added to git by the smudge filter when annex.dotfiles was not set.
This commit is contained in:
parent
96ed67671d
commit
1978a24207
4 changed files with 22 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -64,3 +64,5 @@ index 3de500c..7898192 100644
|
|||
|
||||
[[!meta author=kyle]]
|
||||
[[!tag projects/datalad]]
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
|
@ -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.
|
||||
"""]]
|
Loading…
Reference in a new issue