* gitignore broken in git 1.7.0.1: slash checks leading dirs @ 2010-03-05 8:55 Jiri Slaby 2010-03-05 9:05 ` Johannes Sixt 0 siblings, 1 reply; 13+ messages in thread From: Jiri Slaby @ 2010-03-05 8:55 UTC (permalink / raw) To: git; +Cc: LKML Hi, having 'linux' line in .gitignore makes 'include/linux/vga_switcheroo.h' to be ignored though the documentation says: *** If the pattern does not contain a slash /, git treats it as a shell glob pattern and checks for a match against the pathname without leading directories. *** $ touch test $ touch include/linux/vga_asdads.h $ git ls-files -o --exclude-from=test include/linux/vga_asdads.h test $ echo linux >test $ git ls-files -o --exclude-from=test test This does not happen with git 1.6. thanks, -- js ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gitignore broken in git 1.7.0.1: slash checks leading dirs 2010-03-05 8:55 gitignore broken in git 1.7.0.1: slash checks leading dirs Jiri Slaby @ 2010-03-05 9:05 ` Johannes Sixt 2010-03-05 9:07 ` Jiri Slaby 2010-03-05 17:01 ` Junio C Hamano 0 siblings, 2 replies; 13+ messages in thread From: Johannes Sixt @ 2010-03-05 9:05 UTC (permalink / raw) To: Jiri Slaby; +Cc: git, LKML Jiri Slaby schrieb: > having 'linux' line in .gitignore makes 'include/linux/vga_switcheroo.h' > to be ignored That's the behavior that I would expect. > though the documentation says: > *** > If the pattern does not contain a slash /, git treats it as a shell > glob pattern and checks for a match against the pathname without > leading directories. > *** and this citation confirms my expectation. Note that it says "pathname", not "filename". 'include/linux' is a "pathname". -- Hannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gitignore broken in git 1.7.0.1: slash checks leading dirs 2010-03-05 9:05 ` Johannes Sixt @ 2010-03-05 9:07 ` Jiri Slaby 2010-03-05 9:16 ` Johannes Sixt 2010-03-05 17:01 ` Junio C Hamano 1 sibling, 1 reply; 13+ messages in thread From: Jiri Slaby @ 2010-03-05 9:07 UTC (permalink / raw) To: Johannes Sixt; +Cc: git, LKML On 03/05/2010 10:05 AM, Johannes Sixt wrote: > Jiri Slaby schrieb: >> having 'linux' line in .gitignore makes 'include/linux/vga_switcheroo.h' >> to be ignored > > That's the behavior that I would expect. > >> though the documentation says: >> *** >> If the pattern does not contain a slash /, git treats it as a shell >> glob pattern and checks for a match against the pathname without >> leading directories. >> *** > > and this citation confirms my expectation. Note that it says "pathname", > not "filename". 'include/linux' is a "pathname". What are 'leading directories' then? -- js ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gitignore broken in git 1.7.0.1: slash checks leading dirs 2010-03-05 9:07 ` Jiri Slaby @ 2010-03-05 9:16 ` Johannes Sixt 2010-03-05 9:20 ` [PATCH 1/1] gitignore: do not ignore include/linux/ Jiri Slaby 2010-03-05 9:29 ` gitignore broken in git 1.7.0.1: slash checks leading dirs Jiri Slaby 0 siblings, 2 replies; 13+ messages in thread From: Johannes Sixt @ 2010-03-05 9:16 UTC (permalink / raw) To: Jiri Slaby; +Cc: git, LKML Jiri Slaby schrieb: > On 03/05/2010 10:05 AM, Johannes Sixt wrote: >> Jiri Slaby schrieb: >>> *** >>> If the pattern does not contain a slash /, git treats it as a shell >>> glob pattern and checks for a match against the pathname without >>> leading directories. >>> *** >> and this citation confirms my expectation. Note that it says "pathname", >> not "filename". 'include/linux' is a "pathname". > > What are 'leading directories' then? 'include/' is the leading directory of 'include/linux'. The cited sentence says that the particular check considers only the last path component of the pathname. -- Hannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/1] gitignore: do not ignore include/linux/ 2010-03-05 9:16 ` Johannes Sixt @ 2010-03-05 9:20 ` Jiri Slaby 2010-03-05 10:43 ` Jakub Narebski 2010-03-08 2:08 ` Américo Wang 2010-03-05 9:29 ` gitignore broken in git 1.7.0.1: slash checks leading dirs Jiri Slaby 1 sibling, 2 replies; 13+ messages in thread From: Jiri Slaby @ 2010-03-05 9:20 UTC (permalink / raw) To: Andrew Morton; +Cc: git, linux-kernel, jirislaby, Johannes Sixt linux entry in .gitignore means that everything in include/linux/ gets ignored with git 1.7. Prepend a slash to entries which are toplevel to avoid that Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Johannes Sixt <j.sixt@viscovery.net> --- .gitignore | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index efab0eb..fe6ebb9 100644 --- a/.gitignore +++ b/.gitignore @@ -34,16 +34,16 @@ modules.builtin # # Top-level generic files # -tags -TAGS -linux -vmlinux -vmlinuz -System.map -Module.markers -Module.symvers -!.gitignore -!.mailmap +/tags +/TAGS +/linux +/vmlinux +/vmlinuz +/System.map +/Module.markers +/Module.symvers +!/.gitignore +!/.mailmap # # Generated include files -- 1.7.0.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/1] gitignore: do not ignore include/linux/ 2010-03-05 9:20 ` [PATCH 1/1] gitignore: do not ignore include/linux/ Jiri Slaby @ 2010-03-05 10:43 ` Jakub Narebski 2010-03-05 15:19 ` Jiri Slaby 2010-03-08 2:08 ` Américo Wang 1 sibling, 1 reply; 13+ messages in thread From: Jakub Narebski @ 2010-03-05 10:43 UTC (permalink / raw) To: Jiri Slaby; +Cc: Andrew Morton, git, linux-kernel, jirislaby, Johannes Sixt Jiri Slaby <jslaby@suse.cz> writes: > linux entry in .gitignore means that everything in include/linux/ > gets ignored with git 1.7. > > Prepend a slash to entries which are toplevel to avoid that > > Signed-off-by: Jiri Slaby <jslaby@suse.cz> > Cc: Johannes Sixt <j.sixt@viscovery.net> > --- > .gitignore | 20 ++++++++++---------- > 1 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/.gitignore b/.gitignore > index efab0eb..fe6ebb9 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -34,16 +34,16 @@ modules.builtin > # > # Top-level generic files > # > -tags > -TAGS > -linux > -vmlinux > -vmlinuz > -System.map > -Module.markers > -Module.symvers > -!.gitignore > -!.mailmap > +/tags > +/TAGS > +/linux > +/vmlinux > +/vmlinuz > +/System.map > +/Module.markers > +/Module.symvers > +!/.gitignore > +!/.mailmap > > # > # Generated include files Actually you want to *not ignore* .gitignore and .mailmap (and .gitattributes which is missing here) anywhere, not only as top-level file. So .gitignore and .mailmap should not be prepended with slash. # # Top-level generic files # -tags -TAGS -linux -vmlinux -vmlinuz -System.map -Module.markers -Module.symvers +/tags +/TAGS +/linux +/vmlinux +/vmlinuz +/System.map +/Module.markers +/Module.symvers !.gitignore !.mailmap -- Jakub Narebski Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/1] gitignore: do not ignore include/linux/ 2010-03-05 10:43 ` Jakub Narebski @ 2010-03-05 15:19 ` Jiri Slaby 2010-03-10 10:07 ` David Rientjes 0 siblings, 1 reply; 13+ messages in thread From: Jiri Slaby @ 2010-03-05 15:19 UTC (permalink / raw) To: Jakub Narebski Cc: Jiri Slaby, Andrew Morton, git, linux-kernel, Johannes Sixt On 03/05/2010 11:43 AM, Jakub Narebski wrote: >> +!/.gitignore >> +!/.mailmap > > Actually you want to *not ignore* .gitignore and .mailmap (and > .gitattributes which is missing here) anywhere, not only as top-level > file. So .gitignore and .mailmap should not be prepended with slash. <and moved out of the 'Top-level generic files' section then> -- js ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/1] gitignore: do not ignore include/linux/ 2010-03-05 15:19 ` Jiri Slaby @ 2010-03-10 10:07 ` David Rientjes 2010-03-10 10:11 ` Américo Wang 0 siblings, 1 reply; 13+ messages in thread From: David Rientjes @ 2010-03-10 10:07 UTC (permalink / raw) To: Linus Torvalds, Jiri Slaby Cc: Jakub Narebski, Jiri Slaby, Andrew Morton, git, linux-kernel, Johannes Sixt On Fri, 5 Mar 2010, Jiri Slaby wrote: > On 03/05/2010 11:43 AM, Jakub Narebski wrote: > >> +!/.gitignore > >> +!/.mailmap > > > > Actually you want to *not ignore* .gitignore and .mailmap (and > > .gitattributes which is missing here) anywhere, not only as top-level > > file. So .gitignore and .mailmap should not be prepended with slash. > > <and moved out of the 'Top-level generic files' section then> > Please either revert 3b2a8c8f3c65 or merge the fixed up patch for 2.6.34-rc2, otherwise include/linux will continue to be ignored by git just like it is for 2.6.34-rc1. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/1] gitignore: do not ignore include/linux/ 2010-03-10 10:07 ` David Rientjes @ 2010-03-10 10:11 ` Américo Wang 2010-03-10 10:25 ` David Rientjes 0 siblings, 1 reply; 13+ messages in thread From: Américo Wang @ 2010-03-10 10:11 UTC (permalink / raw) To: David Rientjes Cc: Linus Torvalds, Jiri Slaby, Jakub Narebski, Jiri Slaby, Andrew Morton, git, linux-kernel, Johannes Sixt On Wed, Mar 10, 2010 at 6:07 PM, David Rientjes <rientjes@google.com> wrote: > On Fri, 5 Mar 2010, Jiri Slaby wrote: > >> On 03/05/2010 11:43 AM, Jakub Narebski wrote: >> >> +!/.gitignore >> >> +!/.mailmap >> > >> > Actually you want to *not ignore* .gitignore and .mailmap (and >> > .gitattributes which is missing here) anywhere, not only as top-level >> > file. So .gitignore and .mailmap should not be prepended with slash. >> >> <and moved out of the 'Top-level generic files' section then> >> > > Please either revert 3b2a8c8f3c65 or merge the fixed up patch for > 2.6.34-rc2, otherwise include/linux will continue to be ignored by git > just like it is for 2.6.34-rc1. Why not apply the patch from Jiri? Since this problem is introduced by new version of git, not that commit. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/1] gitignore: do not ignore include/linux/ 2010-03-10 10:11 ` Américo Wang @ 2010-03-10 10:25 ` David Rientjes 0 siblings, 0 replies; 13+ messages in thread From: David Rientjes @ 2010-03-10 10:25 UTC (permalink / raw) To: Américo Wang Cc: Linus Torvalds, Jiri Slaby, Jakub Narebski, Jiri Slaby, Andrew Morton, git, linux-kernel, Johannes Sixt [-- Attachment #1: Type: TEXT/PLAIN, Size: 940 bytes --] On Wed, 10 Mar 2010, Américo Wang wrote: > >> >> +!/.gitignore > >> >> +!/.mailmap > >> > > >> > Actually you want to *not ignore* .gitignore and .mailmap (and > >> > .gitattributes which is missing here) anywhere, not only as top-level > >> > file. So .gitignore and .mailmap should not be prepended with slash. > >> > >> <and moved out of the 'Top-level generic files' section then> > >> > > > > Please either revert 3b2a8c8f3c65 or merge the fixed up patch for > > 2.6.34-rc2, otherwise include/linux will continue to be ignored by git > > just like it is for 2.6.34-rc1. > > Why not apply the patch from Jiri? Since this problem is introduced > by new version of git, not that commit. > Like I said, please either revert the commit that added "linux" to .gitignore or merge Jiri's patch. I'm not interested in engaging in a discussion about what can or cannot be merged during rc cycles, I just hope this is resolved for rc2. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/1] gitignore: do not ignore include/linux/ 2010-03-05 9:20 ` [PATCH 1/1] gitignore: do not ignore include/linux/ Jiri Slaby 2010-03-05 10:43 ` Jakub Narebski @ 2010-03-08 2:08 ` Américo Wang 1 sibling, 0 replies; 13+ messages in thread From: Américo Wang @ 2010-03-08 2:08 UTC (permalink / raw) To: Jiri Slaby; +Cc: Andrew Morton, git, linux-kernel, jirislaby, Johannes Sixt On Fri, Mar 5, 2010 at 5:20 PM, Jiri Slaby <jslaby@suse.cz> wrote: > linux entry in .gitignore means that everything in include/linux/ > gets ignored with git 1.7. > > Prepend a slash to entries which are toplevel to avoid that New change in git 1.7? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gitignore broken in git 1.7.0.1: slash checks leading dirs 2010-03-05 9:16 ` Johannes Sixt 2010-03-05 9:20 ` [PATCH 1/1] gitignore: do not ignore include/linux/ Jiri Slaby @ 2010-03-05 9:29 ` Jiri Slaby 1 sibling, 0 replies; 13+ messages in thread From: Jiri Slaby @ 2010-03-05 9:29 UTC (permalink / raw) To: Johannes Sixt; +Cc: git, LKML On 03/05/2010 10:16 AM, Johannes Sixt wrote: > The cited sentence says that the particular check considers only the last > path component of the pathname. Thinking about it, there is no way to specify a *filename* no matter where it lies? I.e. patterns such as *.o matches also a/b/test.o/test.c? Am I missing something? -- js ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gitignore broken in git 1.7.0.1: slash checks leading dirs 2010-03-05 9:05 ` Johannes Sixt 2010-03-05 9:07 ` Jiri Slaby @ 2010-03-05 17:01 ` Junio C Hamano 1 sibling, 0 replies; 13+ messages in thread From: Junio C Hamano @ 2010-03-05 17:01 UTC (permalink / raw) To: Johannes Sixt; +Cc: Jiri Slaby, git, LKML Johannes Sixt <j.sixt@viscovery.net> writes: > Jiri Slaby schrieb: >> having 'linux' line in .gitignore makes 'include/linux/vga_switcheroo.h' >> to be ignored > > That's the behavior that I would expect. Also the initial report made it sound as if there were a regression, but it doesn't seem to be the case; I don't see it behaving any differently among 1.7.0, 1.7.0.1, 1.6.0, 1.6.6, or even 1.5.4. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-03-10 10:26 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-03-05 8:55 gitignore broken in git 1.7.0.1: slash checks leading dirs Jiri Slaby 2010-03-05 9:05 ` Johannes Sixt 2010-03-05 9:07 ` Jiri Slaby 2010-03-05 9:16 ` Johannes Sixt 2010-03-05 9:20 ` [PATCH 1/1] gitignore: do not ignore include/linux/ Jiri Slaby 2010-03-05 10:43 ` Jakub Narebski 2010-03-05 15:19 ` Jiri Slaby 2010-03-10 10:07 ` David Rientjes 2010-03-10 10:11 ` Américo Wang 2010-03-10 10:25 ` David Rientjes 2010-03-08 2:08 ` Américo Wang 2010-03-05 9:29 ` gitignore broken in git 1.7.0.1: slash checks leading dirs Jiri Slaby 2010-03-05 17:01 ` Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox