* gitignore bug: including files in an excluded directoy does not work.
@ 2009-05-23 9:18 Florian Köberle
2009-05-27 20:55 ` Michael J Gruber
0 siblings, 1 reply; 3+ messages in thread
From: Florian Köberle @ 2009-05-23 9:18 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano
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.
commit d6b8fc303b389b026f2bf9918f6f83041488989b
Author: Junio C Hamano <gitster pobox.com>
Date: Thu Jan 31 01:17:48 2008 -0800
gitignore(5): Allow "foo/" in ignore list to match directory "foo"
Best regards,
Florian Köberle
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gitignore bug: including files in an excluded directoy does not work.
2009-05-23 9:18 gitignore bug: including files in an excluded directoy does not work Florian Köberle
@ 2009-05-27 20:55 ` Michael J Gruber
2009-05-29 21:25 ` Florian Köberle
0 siblings, 1 reply; 3+ messages in thread
From: Michael J Gruber @ 2009-05-27 20:55 UTC (permalink / raw)
To: florian; +Cc: git, Junio C Hamano
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gitignore bug: including files in an excluded directoy does not work.
2009-05-27 20:55 ` Michael J Gruber
@ 2009-05-29 21:25 ` Florian Köberle
0 siblings, 0 replies; 3+ messages in thread
From: Florian Köberle @ 2009-05-29 21:25 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git
Michael J Gruber wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-29 21:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-23 9:18 gitignore bug: including files in an excluded directoy does not work Florian Köberle
2009-05-27 20:55 ` Michael J Gruber
2009-05-29 21:25 ` Florian Köberle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.