Commit graph

33 commits

Author SHA1 Message Date
thislooksfun
3ad0e1aa57
Respect applies_in scope when processing nested ignores (#746)
Previously, when importing multiple nested ignore files, some info from
the parent—notably the "root" path—would be inherited. This lead to some
problems with matching of "pseudo-absolute" rules (those with a leading
slash) in nested ignore files (see #745 for more details). To fix this,
we now fully isolate each path of the tree during the import process.
This leads to more accurate, though unfortunately slightly less
performant, rule matching. The only time a builder is reused now is if
two input files have the same `applies_in` value, in which case they are
merged together.

I have added tests to ensure correctness and prevent a regression. I
also was careful to make sure no previous tests broke in any way (all
changes to existing tests were made in isolation, and thus are not
affected by the logic changes). As far as I can tell, the only behavior
change is that now some previously-ignored rules will now be applied,
which could, in very rare configurations, lead to files being
unintentionally ignored. However, due to the aforementioned logic bug,
those files were all ignored by git already, so I suspect the number of
people actually caught off guard by this change to be extremely low,
likely zero.

Fixes #745.
2023-12-30 14:12:59 +13:00
github-actions[bot]
64bdf7c9d5
release: ignore-files v1.3.2 (#689)
Co-authored-by: github-actions <github-actions@github.com>
2023-11-26 04:22:00 +00:00
github-actions[bot]
f66aa5d808
release: project-origins v1.2.1 (#687)
Co-authored-by: github-actions <github-actions@github.com>
2023-11-26 03:30:39 +00:00
Félix Saparelli
a13bc429eb
Watchexec lib v3 (#601)
Co-authored-by: emilHof <95590295+emilHof@users.noreply.github.com>
2023-11-25 20:33:44 +00:00
dependabot[bot]
afe317d4ee
Update gix-config requirement from 0.24.0 to 0.25.1 in /crates/ignore-files (#622)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-30 10:33:37 +12:00
dependabot[bot]
0f2f5f4ea6
Update gix-config requirement from 0.22.0 to 0.24.0 in /crates/ignore-files (#614)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 13:10:47 +12:00
github-actions[bot]
d25ae71787
release: ignore-files v1.3.1 (#600)
Co-authored-by: github-actions <github-actions@github.com>
2023-06-04 20:53:24 +12:00
Jonathan Cammisuli
638cddcf83
handle relative paths when using Ignore programmatically (#599) 2023-06-03 20:24:39 +12:00
github-actions[bot]
7c1c726d85
release: ignore-files v1.3.0 (#588)
Co-authored-by: github-actions <github-actions@github.com>
2023-05-14 09:31:05 +00:00
Jonathan Cammisuli
3e79957ad3
Handle nested gitignores (#580) 2023-05-08 22:13:04 +00:00
dependabot[bot]
b9c052d10e
Update gix-config requirement from 0.19.0 to 0.22.0 in /crates/ignore-files (#576)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-07 11:26:02 +12:00
github-actions[bot]
26679721aa
release: ignore-files v1.2.0 (#534)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-03-19 01:08:22 +13:00
dependabot[bot]
64ad4e31f5
Update gix-config requirement from 0.18.0 to 0.19.0 in /crates/ignore-files (#526)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-18 21:22:58 +13:00
dependabot[bot]
f83790bce3
Update gix-config requirement from 0.17.0 to 0.18.0 in /crates/ignore-files (#518)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-05 17:17:11 +13:00
Félix Saparelli
c87a7343b3
Update deps (#511) 2023-03-04 04:21:38 +13:00
David Perez
70beb51ab5
Switch to gix-config because git-config is deprecated (#502)
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-03-02 16:17:19 +13:00
dependabot[bot]
2c06f06ee1
Bump tokio from 1.23.1 to 1.24.2 (#491)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 15:55:29 +13:00
Félix Saparelli
950f302ebf
Lock CI for msrv checks (#482) 2023-01-12 04:35:34 +13:00
dependabot[bot]
19f5bd0d1e
Update git-config requirement from 0.14.0 to 0.15.0 in /crates/ignore-files (#480)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 15:36:43 +13:00
github-actions[bot]
33f5ba5ef9
release: ignore-files v1.1.0 (#471)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-01-08 17:12:08 +00:00
github-actions[bot]
f55d669e3c
release: project-origins v1.2.0 (#470)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2023-01-08 16:05:49 +00:00
dependabot[bot]
5d0920c5c9
Bump tokio from 1.21.0 to 1.23.1 (#467) 2023-01-07 00:10:45 +00:00
dependabot[bot]
50c1832b35
Update git-config requirement from 0.12.0 to 0.14.0 in /crates/ignore-files (#464)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-07 03:18:01 +13:00
Félix Saparelli
dc98370492
Clippy fixes (#465) 2023-01-07 02:53:49 +13:00
dependabot[bot]
db287c49f7
Update git-config requirement from 0.7.1 to 0.12.0 in /crates/ignore-files (#448) 2022-11-24 23:25:38 +00:00
github-actions[bot]
d168ed9676
release: ignore-files v1.0.1 (#407)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2022-09-07 03:50:18 +00:00
github-actions[bot]
c46187f92d
release: project-origins v1.1.1 (#408)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2022-09-07 03:29:23 +00:00
Félix Saparelli
24a3a3c2f2
Deps: update miette and git-config (#406) 2022-09-07 02:52:53 +00:00
github-actions[bot]
ce68338381 release: project-origins v1.1.0 (#385)
This is a release PR for **project-origins** to version **1.1.0**.

Upon merging, you will still need to manually publish the cargo crate.

```
$ cd crates/project-origins
$ cargo publish
```

To merge this release, review the changes then say:

| bors r+ p=10 |
|:-:|
2022-08-24 09:23:52 +00:00
Félix Saparelli
4562c0f2f9 release: ignore-files v1.0.0 (#318)
Co-authored-by: github-actions <github-actions@github.com>
2022-06-16 11:09:16 +00:00
github-actions[bot]
b133486c66 release: project-origins v1.0.0 (#314)
This is a release PR for **project-origins** to version **1.0.0**.

  Upon merging, you will still need to manually publish the cargo crate.

```
$ cd crates/project-origins
$ cargo publish
```

To merge this release, review the changes then say:

```
bors r+
```
2022-06-16 09:01:22 +00:00
Félix Saparelli
e98989f099
Almost there 2022-06-16 20:28:07 +12:00
Félix Saparelli
35cf63bc85 Split into more crates (#307) 2022-06-15 03:25:05 +00:00