git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git clean deletes negated pathspec if directory causing data loss
@ 2025-10-05 11:27 Devste Devste
  2025-10-05 11:33 ` Devste Devste
  0 siblings, 1 reply; 5+ messages in thread
From: Devste Devste @ 2025-10-05 11:27 UTC (permalink / raw)
  To: git

I am using:
git version 2.51.0.windows.1

Run:
echo .idea/dictionaries >> .gitignore
mkdir -p .idea/dictionaries
touch .idea/dictionaries/foo.xml
git clean -f -f -d -X --dry-run -- ':!/.idea/dictionaries' ':*.rej' ':/*/*.log'

Outputs:
Would remove .idea/dictionaries/

No matter how you specify the pathspec (':!.idea',...) it always wants
to delete the .idea/dictionaries directory, even though it does not
contain any .rej or .log files and is explicitly set to excluded

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-30 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-05 11:27 git clean deletes negated pathspec if directory causing data loss Devste Devste
2025-10-05 11:33 ` Devste Devste
2025-10-29 20:00   ` Devste Devste
2025-10-30  8:49     ` Johannes Schindelin
2025-10-30 17:04       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).