From: Stefan Sperling Subject: Re: got ignore some .{cvs,git}ignore files To: Sebastien Marie Cc: gameoftrees@openbsd.org Date: Thu, 25 Jun 2020 08:52:20 +0200 On Thu, Jun 25, 2020 at 08:34:42AM +0200, Sebastien Marie wrote: > > + err = add_ignores(&a->ignores, a->worktree->root_path, > > + path, dirfd, ".cvsignore"); > > + if (err) > > + return err; > > + > > + err = add_ignores(&a->ignores, a->worktree->root_path, path, > > + dirfd, ".gitignore"); > > + > > there is a behaviour change in ignore files: > - before, it would use .cvsignore, and if not exists use .gitignore > - now, it will use both .cvsignore and .gitignore I don't think so. The old code was (in pseudo code): err = add_ignores(".cvsignore"); if (err == NULL) /* not 'if (err)' */ err = add_ignores(".gitignore"); return err; Which to me looks like the same behaviour as the new code. But the new code is easier to follow ;) > I am not sure if it is intented or not. but I am fine with both :) The intention was always to use both files when both are present. > Else, the patch reads OK. Thanks! :)