Hello community,

here is the log from the commit of package ghc-Glob for openSUSE:Factory 
checked in at 2019-01-25 22:42:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-Glob (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-Glob.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-Glob"

Fri Jan 25 22:42:21 2019 rev:14 rq:667131 version:0.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-Glob/ghc-Glob.changes        2018-10-25 
08:17:12.772047886 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-Glob.new.28833/ghc-Glob.changes     
2019-01-25 22:42:21.503302637 +0100
@@ -1,0 +2,9 @@
+Thu Dec 20 03:01:18 UTC 2018 - [email protected]
+
+- Update Glob to version 0.10.0.
+  0.10.0, 2018-12-19:
+       Bug fix: "**/" matched hidden directories in some scenarios even when
+                matchDotsImplicitly was set to False.
+                Thanks to Travis Sunderland for the report as well as the fix.
+
+-------------------------------------------------------------------

Old:
----
  Glob-0.9.3.tar.gz

New:
----
  Glob-0.10.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-Glob.spec ++++++
--- /var/tmp/diff_new_pack.AcEtEu/_old  2019-01-25 22:42:22.007302016 +0100
+++ /var/tmp/diff_new_pack.AcEtEu/_new  2019-01-25 22:42:22.007302016 +0100
@@ -19,7 +19,7 @@
 %global pkg_name Glob
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.9.3
+Version:        0.10.0
 Release:        0
 Summary:        Globbing library
 License:        BSD-3-Clause
@@ -58,6 +58,7 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+chmod -x *.txt   # https://github.com/Deewiant/glob/issues/31
 
 %build
 %ghc_lib_build

++++++ Glob-0.9.3.tar.gz -> Glob-0.10.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Glob-0.9.3/CHANGELOG.txt 
new/Glob-0.10.0/CHANGELOG.txt
--- old/Glob-0.9.3/CHANGELOG.txt        2018-09-22 11:55:01.000000000 +0200
+++ new/Glob-0.10.0/CHANGELOG.txt       1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +1,8 @@
+0.10.0, 2018-12-19:
+       Bug fix: "**/" matched hidden directories in some scenarios even when
+                matchDotsImplicitly was set to False.
+                Thanks to Travis Sunderland for the report as well as the fix.
+
 0.9.3, 2018-09-22:
        Updated dependencies to allow containers-0.7 (GHC 8.6). Thanks to
        chessai for the merge request.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Glob-0.9.3/CREDITS.txt new/Glob-0.10.0/CREDITS.txt
--- old/Glob-0.9.3/CREDITS.txt  2018-09-22 11:55:01.000000000 +0200
+++ new/Glob-0.10.0/CREDITS.txt 1970-01-01 01:00:00.000000000 +0100
@@ -4,3 +4,4 @@
 Stephen Hicks
 Matti Niemenmaa
 Masahiro Sakai
+Travis Sunderland
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Glob-0.9.3/Glob.cabal new/Glob-0.10.0/Glob.cabal
--- old/Glob-0.9.3/Glob.cabal   2018-09-22 11:55:01.000000000 +0200
+++ new/Glob-0.10.0/Glob.cabal  1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
 Cabal-Version: >= 1.9.2
 
 Name:        Glob
-Version:     0.9.3
+Version:     0.10.0
 Homepage:    http://iki.fi/matti.niemenmaa/glob/
 Synopsis:    Globbing library
 Category:    System
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Glob-0.9.3/System/FilePath/Glob/Match.hs 
new/Glob-0.10.0/System/FilePath/Glob/Match.hs
--- old/Glob-0.9.3/System/FilePath/Glob/Match.hs        2018-09-22 
11:55:01.000000000 +0200
+++ new/Glob-0.10.0/System/FilePath/Glob/Match.hs       1970-01-01 
01:00:00.000000000 +0100
@@ -6,6 +6,8 @@
 
 import Control.Exception (assert)
 import Data.Char         (isDigit, toLower, toUpper)
+import Data.List         (findIndex)
+import Data.Maybe        (fromMaybe, isJust)
 #if !MIN_VERSION_base(4,8,0)
 import Data.Monoid       (mappend)
 #endif
@@ -122,14 +124,16 @@
 match' o again@(AnyNonPathSeparator:xs) path@(c:cs) =
    match' o xs path || (not (isPathSeparator c) && match' o again cs)
 
-match' o again@(AnyDirectory:xs) path =
-   let parts   = pathParts (dropWhile isPathSeparator path)
-       matches = any (match' o xs) parts || any (match' o again) (tail parts)
-    in if null xs && not (matchDotsImplicitly o)
-          --  **/ shouldn't match foo/.bar, so check that remaining bits don't
-          -- start with .
-          then all (not.isExtSeparator.head) (init parts) && matches
-          else matches
+match' o (AnyDirectory:xs) path =
+   if matchDotsImplicitly o
+      then hasMatch
+      --  **/baz shouldn't match foo/.bar/baz, so check that none of the
+      -- directories matched by **/ start with .
+      else hasMatch && all (not.isExtSeparator.head) matchedDirs
+ where parts   = pathParts (dropWhile isPathSeparator path)
+       matchIndex = findIndex (match' o xs) parts
+       hasMatch = isJust matchIndex
+       matchedDirs = take (fromMaybe 0 matchIndex) parts
 
 match' o (LongLiteral len s:xs) path =
    let (pre,cs) = splitAt len path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Glob-0.9.3/tests/Tests/Regression.hs 
new/Glob-0.10.0/tests/Tests/Regression.hs
--- old/Glob-0.9.3/tests/Tests/Regression.hs    2018-09-22 11:55:01.000000000 
+0200
+++ new/Glob-0.10.0/tests/Tests/Regression.hs   1970-01-01 01:00:00.000000000 
+0100
@@ -141,6 +141,12 @@
    , (False, "<-><->"     , "1")
    , (True,  "<0-0><1-1>" , "01")
    , (True,  "<0-1><0-1>" , "00")
+   , (False, "a/**/d"     , "a/.b/c/d")
+   , (False, "a/**/d"     , "a/b/.c/d")
+   , (True,  "a/**/.d"    , "a/b/c/.d")
+   , (True,  "a/**/.c/d"  , "a/b/.c/d")
+   , (True,  "a/**/.c/.d" , "a/b/.c/.d")
+   , (True,  "a/**/.d/.e" , "a/b/c/.d/.e")
    ]
 
 matchWithCases :: [(Bool, CompOptions, MatchOptions, String, String)]


Reply via email to