addurl: Fix bug in checking annex.largefiles expressions using largerthan, mimetype, and smallerthan; the first two always failed to match, and the latter always matched.
This commit is contained in:
parent
3c1c3b96fa
commit
6e6d1a8c15
4 changed files with 30 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
git-annex (6.20161119) UNRELEASED; urgency=medium
|
||||
|
||||
* addurl: Fix bug in checking annex.largefiles expressions using
|
||||
largerthan, mimetype, and smallerthan; the first two always failed
|
||||
to match, and the latter always matched.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Mon, 21 Nov 2016 11:27:50 -0400
|
||||
|
||||
git-annex (6.20161118) unstable; urgency=medium
|
||||
|
||||
* git-annex.cabal: Loosen bounds on persistent to allow 2.5, which
|
||||
|
|
|
@ -341,7 +341,7 @@ cleanup u url file key mtmp = case mtmp of
|
|||
Nothing -> go
|
||||
Just tmp -> do
|
||||
largematcher <- largeFilesMatcher
|
||||
ifM (checkFileMatcher largematcher file)
|
||||
ifM (checkFileMatcher largematcher tmp)
|
||||
( go
|
||||
, do
|
||||
liftIO $ renameFile tmp file
|
||||
|
|
|
@ -37,4 +37,4 @@ cached/staged changes:
|
|||
"""]]
|
||||
|
||||
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 1"""
|
||||
date="2016-11-21T15:12:54Z"
|
||||
content="""
|
||||
It's sufficient to have "* annex.largefiles=(largerthan=100kb)"
|
||||
in .gitattributes.
|
||||
|
||||
Even "* annex.largefiles=(largerthan=0kb)" will reproduce it.
|
||||
|
||||
Ok, I see why.. It's running the largefile matcher on the destination file
|
||||
before it renames the temp file to it!
|
||||
|
||||
Seems to have been broken this way ever since addurl got largefiles
|
||||
support. Testing didn't catch it because it only affects largefiles
|
||||
expressions that need to examine the file.
|
||||
|
||||
Fixed in git. Audited other checkFileMatcher calls for this problem;
|
||||
the rest are ok.
|
||||
"""]]
|
Loading…
Reference in a new issue