]> git.proxmox.com Git - pathpatterns.git/log
pathpatterns.git
6 months agobump d/control master
Wolfgang Bumiller [Thu, 19 Oct 2023 09:11:25 +0000 (11:11 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 months agobump version to 0.3.0-1
Wolfgang Bumiller [Thu, 19 Oct 2023 09:10:35 +0000 (11:10 +0200)]
bump version to 0.3.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 months agomatch_list: remove unsafe std::mem::transmute
Gabriel Goller [Mon, 18 Sep 2023 13:41:08 +0000 (15:41 +0200)]
match_list: remove unsafe std::mem::transmute

By adding a lifetime to the `MatchList` trait, we don't need
to use unsafe code to transmute self anymore.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
8 months agobuildsys: fix rebuild logic
Wolfgang Bumiller [Thu, 24 Aug 2023 08:16:53 +0000 (10:16 +0200)]
buildsys: fix rebuild logic

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agobump version to 0.2.0-1
Wolfgang Bumiller [Thu, 24 Aug 2023 08:01:36 +0000 (10:01 +0200)]
bump version to 0.2.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agobuildsys: various improvements
Wolfgang Bumiller [Thu, 24 Aug 2023 08:08:38 +0000 (10:08 +0200)]
buildsys: various improvements

- make deb and dsc targets phony and always rebuild the build/ dir
- add the build/*.{deb,dsc} files as targets without forcing a
  recreation of the build/ dir
- make upload target autodetect the distribution

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agoupdate d/copyright
Wolfgang Bumiller [Thu, 24 Aug 2023 08:01:08 +0000 (10:01 +0200)]
update d/copyright

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agobuildsys: add dsc target
Wolfgang Bumiller [Thu, 24 Aug 2023 08:00:38 +0000 (10:00 +0200)]
buildsys: add dsc target

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agobump edition to 2021
Wolfgang Bumiller [Thu, 24 Aug 2023 07:57:30 +0000 (09:57 +0200)]
bump edition to 2021

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agominor cleanups
Wolfgang Bumiller [Thu, 24 Aug 2023 07:54:49 +0000 (09:54 +0200)]
minor cleanups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agomatch_list: updated `matches()`, to only retrieve file mode if necessary
Gabriel Goller [Tue, 22 Aug 2023 14:05:16 +0000 (16:05 +0200)]
match_list: updated `matches()`, to only retrieve file mode if necessary

Updated `matches()` function, which now takes the `GetFileMode` trait and returns a
Result. `GetFileMode` is a function that should return the `file_mode`. `matches()`
will go through the patterns and match by path only until it finds a pattern which
does not have `MatchFlag::ANY_FILE_TYPE`, in case it will call the
`get_file_mode`, which will return a `file_mode`. This will ensure that the
`get()` (which in our case executes `stat()`) will only be run once(at most),
every pattern will only be processed once and that the order of the patterns
will be respected. `GetFileMode` is also implemented for `Option<u32>` (so that
we can simply pass options of the `file_mode`) and `u32` (returning
`std::convert::Infallible`, so that we can pass a u32 mode directly).

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
15 months agoupdate d/control
Fabian Grünbichler [Thu, 5 Jan 2023 14:05:41 +0000 (15:05 +0100)]
update d/control

after debcargo update

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21 months agobump version to 0.1.3-1
Wolfgang Bumiller [Fri, 29 Jul 2022 09:58:15 +0000 (11:58 +0200)]
bump version to 0.1.3-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
21 months agoclippy fixes
Wolfgang Bumiller [Fri, 29 Jul 2022 09:56:18 +0000 (11:56 +0200)]
clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoclippy fixes
Wolfgang Bumiller [Fri, 25 Jun 2021 11:18:52 +0000 (13:18 +0200)]
clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodebcargo: fix maintainer directive
Fabian Grünbichler [Mon, 1 Feb 2021 10:21:51 +0000 (11:21 +0100)]
debcargo: fix maintainer directive

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agodoc fixups for intra-doc-links
Wolfgang Bumiller [Fri, 4 Dec 2020 08:25:29 +0000 (09:25 +0100)]
doc fixups for intra-doc-links

because rustc 1.48 now supports them in stable

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotests for relative and absolute, anchored and unanchored mixes
Wolfgang Bumiller [Wed, 11 Nov 2020 12:56:04 +0000 (13:56 +0100)]
tests for relative and absolute, anchored and unanchored mixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoformatting fixup
Wolfgang Bumiller [Fri, 28 Aug 2020 07:00:43 +0000 (09:00 +0200)]
formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix d/control recreation
Wolfgang Bumiller [Tue, 25 Aug 2020 10:48:20 +0000 (12:48 +0200)]
fix d/control recreation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobuild in subdir, add d/control, add upload target
Wolfgang Bumiller [Tue, 25 Aug 2020 08:30:53 +0000 (10:30 +0200)]
build in subdir, add d/control, add upload target

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix license identifier
Wolfgang Bumiller [Tue, 14 Jul 2020 09:54:53 +0000 (11:54 +0200)]
fix license identifier

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoignore .cargo in Cargo.toml
Wolfgang Bumiller [Tue, 14 Jul 2020 09:50:49 +0000 (11:50 +0200)]
ignore .cargo in Cargo.toml

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.1.2-1
Wolfgang Bumiller [Thu, 9 Jul 2020 12:32:22 +0000 (14:32 +0200)]
bump version to 0.1.2-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoFix /**/ special case for beginning-of-text matching
Wolfgang Bumiller [Thu, 9 Jul 2020 12:29:28 +0000 (14:29 +0200)]
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>
3 years agopattern: drop unused component slice parameter
Wolfgang Bumiller [Thu, 9 Jul 2020 12:24:07 +0000 (14:24 +0200)]
pattern: drop unused component slice parameter

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotypo and debug print fixup
Wolfgang Bumiller [Thu, 9 Jul 2020 12:21:37 +0000 (14:21 +0200)]
typo and debug print fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodescription fixup
Wolfgang Bumiller [Tue, 9 Jun 2020 12:19:42 +0000 (14:19 +0200)]
description fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.1.1-1
Wolfgang Bumiller [Tue, 9 Jun 2020 10:58:44 +0000 (12:58 +0200)]
bump version to 0.1.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodrop mut on self in MatchEntry::match_flags
Wolfgang Bumiller [Tue, 9 Jun 2020 10:09:27 +0000 (12:09 +0200)]
drop mut on self in MatchEntry::match_flags

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofixup clean target in Makefile
Wolfgang Bumiller [Thu, 4 Jun 2020 09:30:32 +0000 (11:30 +0200)]
fixup clean target in Makefile

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd debian build files
Wolfgang Bumiller [Wed, 3 Jun 2020 11:32:09 +0000 (13:32 +0200)]
add debian build files

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd .cargo/config to use local repos
Wolfgang Bumiller [Wed, 3 Jun 2020 11:30:33 +0000 (13:30 +0200)]
add .cargo/config to use local repos

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoRelax MatchList to support slices of references
Wolfgang Bumiller [Fri, 29 May 2020 11:22:19 +0000 (13:22 +0200)]
Relax MatchList to support slices of references

It must not consume `self`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodocument MatchList
Wolfgang Bumiller [Fri, 29 May 2020 10:50:28 +0000 (12:50 +0200)]
document MatchList

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix non-anchored literal matches starting with a slash
Wolfgang Bumiller [Fri, 29 May 2020 09:05:13 +0000 (11:05 +0200)]
fix non-anchored literal matches starting with a slash

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoReplace MatchList type with a trait.
Wolfgang Bumiller [Thu, 28 May 2020 13:06:45 +0000 (15:06 +0200)]
Replace MatchList type with a trait.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoMatchEntry: also provide access to other parts
Wolfgang Bumiller [Wed, 20 May 2020 10:37:05 +0000 (12:37 +0200)]
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>
3 years agoMatchEntry: add mutable accessors
Wolfgang Bumiller [Wed, 20 May 2020 10:32:59 +0000 (12:32 +0200)]
MatchEntry: add mutable accessors

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd MatchPattern::Literal
Wolfgang Bumiller [Wed, 20 May 2020 10:14:16 +0000 (12:14 +0200)]
add MatchPattern::Literal

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoAdd MatchEntry::parse_pattern
Wolfgang Bumiller [Tue, 28 Apr 2020 10:43:46 +0000 (12:43 +0200)]
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>
4 years agoPattern: strip triling slashes, forbid empty patterns
Wolfgang Bumiller [Tue, 28 Apr 2020 10:05:53 +0000 (12:05 +0200)]
Pattern: strip triling slashes, forbid empty patterns

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoMatchList::with_capacity and Into<Vec<MatchEntry>>
Wolfgang Bumiller [Mon, 27 Apr 2020 14:54:38 +0000 (16:54 +0200)]
MatchList::with_capacity and Into<Vec<MatchEntry>>

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoinitial import
Wolfgang Bumiller [Fri, 24 Apr 2020 15:48:01 +0000 (17:48 +0200)]
initial import

Signed-off-by: Wolfgang Bumiller <w.bumiller@errno.eu>