{"thread":{"id":"4429","subject":"gitignore: regex for the current dir files only?","startedAt":"2006-06-08T02:13:24Z","lastAt":"2006-06-08T02:40:07Z","messageCount":2,"participants":["Yasushi SHOJI","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"21408","messageId":"87mzcol7i3.wl@mail2.atmark-techno.com","threadId":"4429","inReplyTo":null,"subject":"gitignore: regex for the current dir files only?","fromName":"Yasushi SHOJI","fromEmail":"yashi@atmark-techno.com","sentAt":"2006-06-08T02:13:24Z","receivedAt":"2006-06-08T02:13:24Z","isPatch":false,"sender":{"key":"yashi@atmark-techno.com","avatar":"https://gravatar.com/avatar/4817e8703ac4379935834d87453faa9d0c94b9dc19d83fcc54c67875eb133e59?d=mp&s=160"},"body":"Hello,\n\nthis problem came up when I was editing vmlinux.lds.S in the kernel\ntree.\n\nbecause we have \"vmlinux*\" in the toplevel .gitignore in linus's tree,\nall vmlinux.lds.S under arch/$(ARCH)/kernel/ is affected. for kernel,\nit might as easier to remove \"*\" from the exp.  but I was wandering if\nit's worth to have an expression for gitignore to handle \"a regex for\nthe current dir only\"?\n\ncomments?\n--\n       yashi\n"},{"id":"21409","messageId":"7virnccquw.fsf@assigned-by-dhcp.cox.net","threadId":"4429","inReplyTo":"87mzcol7i3.wl@mail2.atmark-techno.com","subject":"Re: gitignore: regex for the current dir files only?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-08T02:40:07Z","receivedAt":"2006-06-08T02:40:07Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yasushi SHOJI <yashi@atmark-techno.com> writes:\n\n> because we have \"vmlinux*\" in the toplevel .gitignore in linus's tree,\n> all vmlinux.lds.S under arch/$(ARCH)/kernel/ is affected. for kernel,\n> it might as easier to remove \"*\" from the exp.  but I was wandering if\n> it's worth to have an expression for gitignore to handle \"a regex for\n> the current dir only\"?\n\nYeah, that would be a very useful thing to have.  Something like\nthis?\n\n#!/bin/sh\n\nrm -rf test\nmkdir -p test/a/b/c\ncd test\ngit init-db\n\ndate >a/vmlinux.1\ndate >a/b/vmlinux.2\ndate >a/b/c/vmlinux.3\n\necho 'vmlinux*' >a/.gitignore\necho '!/vmlinux*' >a/b/.gitignore\n\ngit status -u\n"}]}