Re: Fwd: Unexpected behavior of ls-files command when using --others --exclude-from, and a .gitignore file which resides in a subdirectory
- From
Raúl Núñez de Arenas Coronado <raulnac@gmail.com>
- Date
- Jan 24, 2024, 14:22 UTC
- Message-ID
- <CAGF1KhV1Gh6WPG7XiQFfEC+G6VY_9AyH3XVoO6VVhMA6za_y3Q@mail.gmail.com>
- In-Reply-To
- <20240124010924.GB2603087@coredump.intra.peff.net>
Hi Jeff!
El mié, 24 ene 2024 a las 2:09, Jeff King (<peff@peff.net>) escribió:
Show 10 quoted lines
> (I think this also gives an interesting use case arguing for continuing > to support those more-specific exclusion options for ls-files). > > If you are mostly just using core.excludesFile (and not > .git/info/exclude), then I suspect: > > git -c core.excludesFile /dev/null ls-files -o --exclude-standard > > would work for you, too (but it sounds like you might also be using > .git/info/exclude).
In my case, since I'm also using .git/info/exclude in some repos, this won't work as-is, but you gave me an idea, and I think I can get what I need until the "precious" mechanism is implemented. It requires a bit of hacking in the backup script but is not a big deal and it will work for all my current repos.
Thanks for the help!
-- Raúl Núñez de Arenas Coronado .