Your message dated Tue, 25 Nov 2025 21:50:28 +0000
with message-id <[email protected]>
and subject line Bug#1107725: fixed in rust-ripgrep 15.1.0-1
has caused the Debian Bug report #1107725,
regarding ripgrep: .gitignore logic is not followed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1107725: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1107725
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Subject: ripgrep: .gitignore logic is not followed
Package: ripgrep
Version: 14.1.1-1+b4
Severity: normal
Tags: patch upstream

ripgrep does not follow .gitignore logic despite documentation claiming the
contrary.

https://github.com/BurntSushi/ripgrep/pull/2933 fixes it.


-- System Information:
Debian Release: 13.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.30-amd64 (SMP w/24 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ripgrep depends on:
ii  libc6         2.41-8
ii  libgcc-s1     14.2.0-19
ii  libpcre2-8-0  10.45-1

ripgrep recommends no packages.

ripgrep suggests no packages.

-- no debconf information

*** /home/user/code/ripgrep/2933.patch
>From 431ab25450c10b64128afb15e988752a48368f90 Mon Sep 17 00:00:00 2001
From: ChristopherYoung <[email protected]>
Date: Fri, 15 Nov 2024 18:40:27 +0800
Subject: [PATCH] ignore: fix filtering searching subdir or .ignore in parent
 dir

The previous code deleted too many parts of the path when constructing the 
absolute path, resulting in a shortened final path. This patch creates the 
correct absolute path by only removing the necessary parts.

Fixes #2836
---
 crates/ignore/src/dir.rs | 40 +++++++++++++++++++++++++---------------
 tests/regression.rs      | 19 +++++++++++++++++++
 2 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/crates/ignore/src/dir.rs b/crates/ignore/src/dir.rs
index b302943ab..d6a82e86e 100644
--- a/crates/ignore/src/dir.rs
+++ b/crates/ignore/src/dir.rs
@@ -461,21 +461,31 @@ impl Ignore {
                 // off of `path`. Overall, this seems a little ham-fisted, but
                 // it does fix a nasty bug. It should do fine until we overhaul
                 // this crate.
-                let dirpath = self.0.dir.as_path();
-                let path_prefix = match strip_prefix("./", dirpath) {
-                    None => dirpath,
-                    Some(stripped_dot_slash) => stripped_dot_slash,
-                };
-                let path = match strip_prefix(path_prefix, path) {
-                    None => abs_parent_path.join(path),
-                    Some(p) => {
-                        let p = match strip_prefix("/", p) {
-                            None => p,
-                            Some(p) => p,
-                        };
-                        abs_parent_path.join(p)
-                    }
-                };
+
+                fn strip_if_is_prefix<'a, P: AsRef<Path> + ?Sized>(
+                    prefix: &'a P,
+                    path: &'a Path,
+                ) -> &'a Path {
+                    strip_prefix(prefix, path).map_or(path, |p| p)
+                }
+
+                let path = abs_parent_path.join(
+                    self.parents()
+                        .take_while(|ig| !ig.0.is_absolute_parent)
+                        .last()
+                        .map_or(path, |ig| {
+                            strip_if_is_prefix(
+                                "/",
+                                strip_if_is_prefix(
+                                    strip_if_is_prefix(
+                                        "./",
+                                        ig.0.dir.as_path(),
+                                    ),
+                                    path,
+                                ),
+                            )
+                        }),
+                );
 
                 for ig in
                     self.parents().skip_while(|ig| !ig.0.is_absolute_parent)
diff --git a/tests/regression.rs b/tests/regression.rs
index e28af4a31..78a645260 100644
--- a/tests/regression.rs
+++ b/tests/regression.rs
@@ -965,6 +965,15 @@ rgtest!(f1757, |dir: Dir, _: TestCommand| {
     eqnice!("rust/source.rs\n", dir.command().args(args).stdout());
     let args = &["--files-with-matches", "needle", "./rust"];
     eqnice!("./rust/source.rs\n", dir.command().args(args).stdout());
+
+    dir.create_dir("rust1/target/onemore");
+    dir.create(".ignore", "rust1/target/onemore");
+    dir.create("rust1/source.rs", "needle");
+    dir.create("rust1/target/onemore/rustdoc-output.html", "needle");
+    let args = &["--files-with-matches", "needle", "rust1"];
+    eqnice!("rust1/source.rs\n", dir.command().args(args).stdout());
+    let args = &["--files-with-matches", "needle", "./rust1"];
+    eqnice!("./rust1/source.rs\n", dir.command().args(args).stdout());
 });
 
 // See: https://github.com/BurntSushi/ripgrep/issues/1765
@@ -1217,3 +1226,13 @@ rgtest!(r2658_null_data_line_regexp, |dir: Dir, mut cmd: 
TestCommand| {
     let got = cmd.args(&["--null-data", "--line-regexp", r"bar"]).stdout();
     eqnice!("haystack:bar\0", got);
 });
+
+rgtest!(f2836, |dir: Dir, mut cmd: TestCommand| {
+    dir.create_dir("testdir/sub/sub2");
+    dir.create(".ignore", "/testdir/sub/sub2/");
+    dir.create("testdir/sub/sub2/testfile", "needle");
+
+    let args = &["--files-with-matches", "needle"];
+    cmd.current_dir(dir.path().join("testdir"));
+    cmd.args(args).assert_err();
+});

--- End Message ---
--- Begin Message ---
Source: rust-ripgrep
Source-Version: 15.1.0-1
Done: Wesley Hershberger <[email protected]>

We believe that the bug you reported is fixed in the latest version of
rust-ripgrep, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Wesley Hershberger <[email protected]> (supplier of updated 
rust-ripgrep package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 25 Nov 2025 22:40:58 +0100
Source: rust-ripgrep
Architecture: source
Version: 15.1.0-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Rust Maintainers 
<[email protected]>
Changed-By: Wesley Hershberger <[email protected]>
Closes: 1107725
Changes:
 rust-ripgrep (15.1.0-1) unstable; urgency=medium
 .
   * Team upload.
   * Package ripgrep 15.1.0 from crates.io using debcargo 2.7.11
   * d/p/disable-jemallocator.diff: refresh
   * Drop d/p/reduce-msrv.diff
   * Closes: #1107725
Checksums-Sha1:
 c12302c8155e551eed006b9daaab9e4165c44391 2564 rust-ripgrep_15.1.0-1.dsc
 9131dc6c61e4f9ac845177b4c52acb86a720e96d 222357 rust-ripgrep_15.1.0.orig.tar.gz
 d627c9d94781b7ebdbb32956274eb67e0dfbc53f 6488 
rust-ripgrep_15.1.0-1.debian.tar.xz
 a6b07a16f7b0817ca6cb5ed223a9869b71a33fc4 7561 
rust-ripgrep_15.1.0-1_source.buildinfo
Checksums-Sha256:
 00aee8f9cb56b82aa3a8cadb267a28d88a8678e6c8f9be0c6a58d766bfc4e827 2564 
rust-ripgrep_15.1.0-1.dsc
 f388c4955f85477c28a8667355819844a06614b083c23517f0e86bd1d6d82b73 222357 
rust-ripgrep_15.1.0.orig.tar.gz
 c3fa48cae38f250f520bb3c652463e202fd18c2361663107e1c03be21cdeb625 6488 
rust-ripgrep_15.1.0-1.debian.tar.xz
 fedd797bc44bed12aeaac59e9970b53b55cbd3fad336fbb197322461494cd74b 7561 
rust-ripgrep_15.1.0-1_source.buildinfo
Files:
 9bf00ca3738c2e2a4c57d903cb457880 2564 utils optional rust-ripgrep_15.1.0-1.dsc
 f6bdffb75a1576e5e4410750f28e4197 222357 utils optional 
rust-ripgrep_15.1.0.orig.tar.gz
 f30c0d33295bf8483b66333bc2c23d7b 6488 utils optional 
rust-ripgrep_15.1.0-1.debian.tar.xz
 4850d9042fd3433a9ff2f2d218d028e2 7561 utils optional 
rust-ripgrep_15.1.0-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJVBAEBCgA/FiEEbdkGe7ToK0Amc9ppdh5TKjcTRTAFAmkmIm0hHGRlYmlhbkBm
YWJpYW4uZ3J1ZW5iaWNobGVyLmVtYWlsAAoJEHYeUyo3E0UwZXYQAIAJc4wE/lPx
WNcA/0EaGzXEKqDYEPDD6lrFu2YJbgnMcoZpZOUrTiLkr0ljwHdYf016z8+i2VOt
tAh9qOcdoicdhJm0+KnoD9WvpwR/UFGqkRI+WnGZ9/bUNKh8C9257doNsYWUMflN
JR63McP+0BRTcUtyya4FACP+DhyQ+LFfawZDULYNua0BBPBHIos0WYKBeNjljyxr
H8DUpw1/ZRdhE3Eb3rnSawKB/5khA18zpX6AGtjwx6dWlpuwvFJVmHkHxuwK5c5d
YKwK9EExxgklgBUglnjd1N40qu9toGCGjdcFlnOFCPuxuxEbQ1dLLwJb08Iq5k43
iNvelL4Hl/29WbmYHYVavFaPcyhNB0G3N+jtLIvxOC5QYcmnoyf8gxSaP8WoPgL2
az3+jH0yIVvncrznfFBQMtoaBSA1O5lwZvHzgcZ29/y79prpZ70GwnvH26p9WYdp
VHFOFQutDd31S+nxlwJuxUnqRyocDkDLLpbq7fj0Dbq468jhX20CaJaMnZxJJk3i
8DLBx5EJMveSukXiPOvKSvOe83cABfSldSz3j29/3bWNwNM6bzlfT7zrSV8gRecI
eAt2XWNTFIpvlLkRqTKFyv2eIHQIcVS6UVVigOqfqAfVkSW5+X+qb/4eDsd18iWS
cRRQqqP776axLROsV54O6O59fQRftyi+
=Ow3M
-----END PGP SIGNATURE-----

Attachment: pgpq2KgJXRjBm.pgp
Description: PGP signature


--- End Message ---

Reply via email to