public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste•net>
To: Simon Cheng <cyqsimon@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: Feat. req.: add a flag to `git clean` to also remove ignored nested repositories
Date: Fri, 9 Jan 2026 13:18:21 +0000	[thread overview]
Message-ID: <aWEAHQLzwTxCpD5Q@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <CA+itcS3-RQ=ESqcWj0Pkw=N4e4gwaz2fp2xH2M1MPXQXaMDmCw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

On 2026-01-09 at 03:50:30, Simon Cheng wrote:
> Currently, running `git clean -dxf` on a repository that includes
> another repository under an ignored path would skip said repository:
> 
> $ git clean -dxf
> Removing foo
> Skipping repository ignored-path/repo
> Removing bar
> 
> This is to request the addition of a new flag to allow altering this
> behaviour, i.e. to make `git clean` remove those repositories too.
> 
> For me, this feature is relevant for building `*-git` packages from
> the AUR, for example https://aur.archlinux.org/packages/paru-git. By
> default `makepkg` would clone the source repo into `./src/NAME`, which
> creates the aforementioned condition. Without such an option on `git
> clean`, cleanup after build is rather complicated.

Does this work if you use `git clean -dxff` (that is, with a second `-f`
flag)?  I do often clean up ignored repositories that way (and it's
documented to do that in the manual page), but I'm not sure if you're
maybe doing something a little different from my workflow.

If that _doesn't_ work for you, would you mind creating a quick shell
script to demonstrate the problem that you're seeing so that we could
provide better advice?
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2026-01-09 13:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  3:50 Feat. req.: add a flag to `git clean` to also remove ignored nested repositories Simon Cheng
2026-01-09 13:18 ` brian m. carlson [this message]
2026-01-16  5:16   ` Simon Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aWEAHQLzwTxCpD5Q@fruit.crustytoothpaste.net \
    --to=sandals@crustytoothpaste$(echo .)net \
    --cc=cyqsimon@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox