"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: fix .{cvs,git}ignore handling
To:
Mikhail Pchelin <misha@freebsd.org>
Cc:
gameoftrees@openbsd.org
Date:
Thu, 13 Aug 2026 13:28:53 +0200

Download raw body.

Thread
On Sat, Aug 08, 2026 at 06:02:01PM +0300, Mikhail Pchelin wrote:
> If both .cvsignore and .gitignore files exist in a directory, only
> .cvsignore will be respected and ignores from the .gitignore will be
> dropped, inlined patch fixes that, both files are respected now, the
> test case is included.

The intention was to merge patterns from both files into a single
ignores list. Your regression test is good, but the fix isn't quite
right. Instead of using two lists, I think read_ignores() needs to be
changed such that it will append to the existing list if a list already
exists for the given path. Do you agree?
 
> This work is part of my larger patch where I'd want to add support for
> .gitconfig core.excludesfile, this the feature I wanted for a long time,
> because in every project I have either Session.vim or cscope.* files,
> and it's not feasible to ask to add those to their ignore files,
> excludesfile helps here a lot to keep the 'status' output clean.

If we add this feature, I would also want this feature in got.conf.
Read configuration data from Git's config files is fine, but it is
usually only used as a fallback.