Commit Graph

27 Commits

Author SHA1 Message Date
Wolfgang Bumiller
2faab5045a tests for relative and absolute, anchored and unanchored mixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-11 13:56:23 +01:00
Wolfgang Bumiller
51f5c11e2b formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-28 09:00:43 +02:00
Wolfgang Bumiller
54ab179254 fix d/control recreation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-25 12:48:20 +02:00
Wolfgang Bumiller
da8de18073 build in subdir, add d/control, add upload target
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-25 10:30:53 +02:00
Wolfgang Bumiller
6a0e9c884a fix license identifier
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-14 11:55:25 +02:00
Wolfgang Bumiller
5d689e0444 ignore .cargo in Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-14 11:50:49 +02:00
Wolfgang Bumiller
916e41c50e bump version to 0.1.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 14:32:22 +02:00
Wolfgang Bumiller
17b7bd9f3c Fix /**/ special case for beginning-of-text matching
Git actually skipped the next slash in the pattern. Since we
don't have a Component::Slash currently we'll just add a
flag to `do_match` instead.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 14:31:18 +02:00
Wolfgang Bumiller
f9fbdc3b94 pattern: drop unused component slice parameter
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 14:24:07 +02:00
Wolfgang Bumiller
37c4c9b20f typo and debug print fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 14:21:37 +02:00
Wolfgang Bumiller
865fa73fbc description fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-09 14:19:42 +02:00
Wolfgang Bumiller
8a186c18a5 bump version to 0.1.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-09 12:58:44 +02:00
Wolfgang Bumiller
68f4fe972d drop mut on self in MatchEntry::match_flags
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-09 12:09:29 +02:00
Wolfgang Bumiller
3b893e0346 fixup clean target in Makefile
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-04 11:30:32 +02:00
Wolfgang Bumiller
7ffe482dd5 add debian build files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-03 13:32:09 +02:00
Wolfgang Bumiller
6d54e32c59 add .cargo/config to use local repos
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-03 13:30:33 +02:00
Wolfgang Bumiller
92591b0073 Relax MatchList to support slices of references
It must not consume `self`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-29 13:22:20 +02:00
Wolfgang Bumiller
909586e6ad document MatchList
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-29 12:50:28 +02:00
Wolfgang Bumiller
1d6ca6ca1b fix non-anchored literal matches starting with a slash
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-29 11:05:13 +02:00
Wolfgang Bumiller
1c51800f17 Replace MatchList type with a trait.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-29 09:42:13 +02:00
Wolfgang Bumiller
8e38a91c57 MatchEntry: also provide access to other parts
In the future we'll probably have a separate Builder type,
but that's an API change.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-20 12:37:05 +02:00
Wolfgang Bumiller
ed626f3831 MatchEntry: add mutable accessors
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-20 12:33:00 +02:00
Wolfgang Bumiller
e86ed76048 add MatchPattern::Literal
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-05-20 12:14:16 +02:00
Wolfgang Bumiller
e2255d72d1 Add MatchEntry::parse_pattern
This is a convenience helper to parse an entry with possible
inversion via a leading exclamation mark and interpreting
trailing slashes to mean `MatchFlag::MATCH_DIRECTORY` and
create a `Pattern` from the string with those characters
stripped off.

This also changes the way `MatchFlag`s are passed to a
builder pattern for convenience.

Also: impl std::ops::Not for MatchType.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-28 13:25:16 +02:00
Wolfgang Bumiller
b1a5365911 Pattern: strip triling slashes, forbid empty patterns
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-28 12:05:53 +02:00
Wolfgang Bumiller
96d7b7c74d MatchList::with_capacity and Into<Vec<MatchEntry>>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-27 16:54:38 +02:00
Wolfgang Bumiller
d5c0e44a9d initial import
Signed-off-by: Wolfgang Bumiller <w.bumiller@errno.eu>
2020-04-27 12:46:59 +02:00