Re: gitignore bug: including files in an excluded directoy does not work.
- From
- Florian Köberle <florian@fkoeberle.de>
- Date
- May 29, 2009, 21:25 UTC
- Message-ID
- <4A2052D5.80604@fkoeberle.de>
- In-Reply-To
- <4A1DA8A7.9030606@drmicha.warpmail.net>
Michael J Gruber wrote:
Show 45 quoted lines
> Florian Köberle venit, vidit, dixit 23.05.2009 11:18: > >> steps to reproduce: >> >> git init >> echo /src/config > .gitignore >> echo \!/src/config/readme.txt >> .gitignore >> mkdir -p src/config >> touch src/config/readme.txt >> git add src >> >> expected results: >> git should add the readme.txt file >> >> actual result: >> git doesn't add the readme.txt file >> >> >> additional comments: >> >> pre to the commit d6b8fc303b it was possible to archive the wished effect >> with this .gitignore file: >> ------------------ >> /src/config/ >> !/src/config/readme.txt >> ------------------ >> The pre d6b8fc303b git fails to detect that it can exclude src/config. >> Thus it checks the directory content and finds out that the readme.txt >> matches both - the exclude and the include pattern. >> > > The change in behaviour was intentional. You get the desired effect using: > > /src/config/* > !/src/config/readme.txt > > Cheers, > Michael > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > >
Hello Michael,
thanks for the explanation.
Best regards, Florian