{"thread":{"id":"445","subject":"[PATCH] Add exclude file support to cg-status","startedAt":"2005-05-03T00:10:42Z","lastAt":"2005-05-08T23:42:27Z","messageCount":9,"participants":["Matt Porter","Junio C Hamano","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"2418","messageId":"20050502171042.A24299@cox.net","threadId":"445","inReplyTo":null,"subject":"[PATCH] Add exclude file support to cg-status","fromName":"Matt Porter","fromEmail":"mporter@kernel.crashing.org","sentAt":"2005-05-03T00:10:42Z","receivedAt":"2005-05-03T00:10:42Z","isPatch":true,"sender":{"key":"mporter@kernel.crashing.org","avatar":null},"body":"Adds a trivial per-repository exclude file implementation for\ncg-status on top of the new git-ls-files option.\n\nSigned-off-by: Matt Porter <mporter@kernel.crashing.org>\n\n--- 002c6f1e4924965e2101d2e6447855f10c55df41/cg-status  (mode:100755 sha1:9e7f0e59284a3d15cda35bbd5579c44d8eda05d5)\n+++ 1b8c5395679e5c04734b1c86445a6355124ada7e/cg-status  (mode:100755 sha1:6669e36f5ff5d5964882b58ba43a5dcab4fd7fc6)\n@@ -7,8 +7,14 @@\n \n . cg-Xlib\n \n+EXCLUDEFILE=.git/exclude\n+EXCLUDE=\n+if [ -f $EXCLUDEFILE ]; then\n+\tEXCLUDE=\"--exclude-from=$EXCLUDEFILE\"\n+fi\n+\n {\n-\tgit-ls-files -z -t --others --deleted --unmerged\n+\tgit-ls-files -z -t --others --deleted --unmerged $EXCLUDE\n } | sort -z -k 2 | xargs -0 sh -c '\n while [ \"$1\" ]; do\n \ttag=${1% *};\n"},{"id":"2426","messageId":"7vd5s9nmio.fsf@assigned-by-dhcp.cox.net","threadId":"445","inReplyTo":"20050502171042.A24299@cox.net","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-03T01:09:19Z","receivedAt":"2005-05-03T01:09:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"MP\" == Matt Porter <mporter@kernel.crashing.org> writes:\n\nMP> Adds a trivial per-repository exclude file implementation for\nMP> cg-status on top of the new git-ls-files option.\n\n \nMP> +EXCLUDEFILE=.git/exclude\n\nGood intentions, but shouldn't the file be .git/info/exclude\n(i.e. under .git/info)?\n\n"},{"id":"2432","messageId":"20050502193343.A25462@cox.net","threadId":"445","inReplyTo":"7vd5s9nmio.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Matt Porter","fromEmail":"mporter@kernel.crashing.org","sentAt":"2005-05-03T02:33:43Z","receivedAt":"2005-05-03T02:33:43Z","isPatch":true,"sender":{"key":"mporter@kernel.crashing.org","avatar":null},"body":"On Mon, May 02, 2005 at 06:09:19PM -0700, Junio C Hamano wrote:\n> >>>>> \"MP\" == Matt Porter <mporter@kernel.crashing.org> writes:\n> \n> MP> Adds a trivial per-repository exclude file implementation for\n> MP> cg-status on top of the new git-ls-files option.\n> \n>  \n> MP> +EXCLUDEFILE=.git/exclude\n> \n> Good intentions, but shouldn't the file be .git/info/exclude\n> (i.e. under .git/info)?\n\nMy reasoning for not doing something like this was that there is\nonly ever one exclude file.  In other instances of cogito specific\ndata in the .git directory, there is a subdir named for the class\nof data being stored there (i.e. branches, refs).  In this case,\nit didn't seem necessary.  On the other hand, this made me\nwonder whether there should just be a .git/cginfo subdir where\nexclude, branches, refs, etc. all live under since they are\ncogito specfic functionality. Something like:\n\n.git/cginfo/\n\n\t    exclude\n\t    branches/\n\t    refs/\n\nand so on...\n\n-Matt\n"},{"id":"2443","messageId":"7v4qdlndw0.fsf@assigned-by-dhcp.cox.net","threadId":"445","inReplyTo":"20050502193343.A25462@cox.net","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-03T04:15:43Z","receivedAt":"2005-05-03T04:15:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"MP\" == Matt Porter <mporter@kernel.crashing.org> writes:\n\nMP> My reasoning for not doing something like this was that there is\nMP> only ever one exclude file.  In other instances of cogito specific\nMP> data in the .git directory, there is a subdir named for the class\nMP> of data being stored there (i.e. branches, refs).  In this case,\nMP> it didn't seem necessary.  On the other hand, this made me\nMP> wonder whether there should just be a .git/cginfo subdir where\nMP> exclude, branches, refs, etc. all live under since they are\nMP> cogito specfic functionality. Something like:\n\nMP> .git/cginfo/\n\nMP> \t    exclude\nMP> \t    branches/\nMP> \t    refs/\n\nMP> and so on...\n\nYou may want to check the past thread, like this one:\n\n    From: Daniel Barkalow <barkalow@iabervon.org>\n    To: Junio C Hamano <junkio@cox.net>\n    cc: David Greaves <david@dgreaves.com>, \n        GIT Mailing Lists <git@vger.kernel.org>\n    Subject: Re: [PATCh] jit-trackdown\n    Message-ID: <Pine.LNX.4.21.0504291730000.30848-100000@iabervon.org>\n\n    On Fri, 29 Apr 2005, Junio C Hamano wrote:\n\n    > Have toilet side gitters reached a concensus (or semi-concensus)\n    > on how things under .git/ should be organized?  Is there a\n    > summary somewhere, something along the following lines?\n\n    I've made a proposal like the following:\n\n    .git/\n      objects/    (traditional)\n      refs/       Directories of hex SHA1 + newline files\n        heads/    Commits which are heads of various sorts\n        tags/     Tags, by the tag name (or some local renaming of it)\n      info/       Other shared information\n        remotes\n      ...         Everything else isn't shared\n      HEAD        Symlink to refs/heads/<something>\n\n    The plumbing doesn't care what you name heads or tags, but expects things\n    to be in heads to be commit objects and tags to be tag objects (which can\n    tag whatever).\n\n    AFAICT, there is general concensus that this is how things should be, but\n    I haven't convinced Linus that the plumbing should know about anything\n    other than objects/.\n\n            -Daniel\n\n"},{"id":"2446","messageId":"20050502212107.A26102@cox.net","threadId":"445","inReplyTo":"7v4qdlndw0.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Matt Porter","fromEmail":"mporter@kernel.crashing.org","sentAt":"2005-05-03T04:21:07Z","receivedAt":"2005-05-03T04:21:07Z","isPatch":true,"sender":{"key":"mporter@kernel.crashing.org","avatar":null},"body":"On Mon, May 02, 2005 at 09:15:43PM -0700, Junio C Hamano wrote:\n> You may want to check the past thread, like this one:\n\n<snip>\n\n>     .git/\n>       objects/    (traditional)\n>       refs/       Directories of hex SHA1 + newline files\n>         heads/    Commits which are heads of various sorts\n>         tags/     Tags, by the tag name (or some local renaming of it)\n>       info/       Other shared information\n>         remotes\n>       ...         Everything else isn't shared\n>       HEAD        Symlink to refs/heads/<something>\n\nOk, I see I skimmed the archives way too fast after vacation. :)\n\nI'll update the patch to match.\n\nThanks,\nMatt\n"},{"id":"2450","messageId":"20050502212701.B26102@cox.net","threadId":"445","inReplyTo":"7vd5s9nmio.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Matt Porter","fromEmail":"mporter@kernel.crashing.org","sentAt":"2005-05-03T04:27:01Z","receivedAt":"2005-05-03T04:27:01Z","isPatch":true,"sender":{"key":"mporter@kernel.crashing.org","avatar":null},"body":"On Mon, May 02, 2005 at 06:09:19PM -0700, Junio C Hamano wrote:\n> >>>>> \"MP\" == Matt Porter <mporter@kernel.crashing.org> writes:\n> \n> MP> Adds a trivial per-repository exclude file implementation for\n> MP> cg-status on top of the new git-ls-files option.\n> \n>  \n> MP> +EXCLUDEFILE=.git/exclude\n> \n> Good intentions, but shouldn't the file be .git/info/exclude\n> (i.e. under .git/info)?\n\nOk, here is the updated version.\n\nSigned-off-by: Matt Porter <mporter@kernel.crashing.org>\n\n--- aa6233be6d1b8bf42797c409a7c23b50593afc99/cg-status  (mode:100755 sha1:9e7f0e59284a3d15cda35bbd5579c44d8eda05d5)\n+++ d69eece260c0c4fcd53991c1b37ac91b99962681/cg-status  (mode:100755 sha1:874504aa8cf9ab7076eb405e19995615b4f59eab)\n@@ -7,8 +7,14 @@\n \n . cg-Xlib\n \n+EXCLUDEFILE=.git/info/exclude\n+EXCLUDE=\n+if [ -f $EXCLUDEFILE ]; then\n+\tEXCLUDE=\"--exclude-from=$EXCLUDEFILE\"\n+fi\n+\n {\n-\tgit-ls-files -z -t --others --deleted --unmerged\n+\tgit-ls-files -z -t --others --deleted --unmerged $EXCLUDE\n } | sort -z -k 2 | xargs -0 sh -c '\n while [ \"$1\" ]; do\n \ttag=${1% *};\n"},{"id":"2761","messageId":"20050508015016.GL9495@pasky.ji.cz","threadId":"445","inReplyTo":"20050502171042.A24299@cox.net","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-08T01:50:16Z","receivedAt":"2005-05-08T01:50:16Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, May 03, 2005 at 02:10:42AM CEST, I got a letter\nwhere Matt Porter <mporter@kernel.crashing.org> told me that...\n> Adds a trivial per-repository exclude file implementation for\n> cg-status on top of the new git-ls-files option.\n> \n> Signed-off-by: Matt Porter <mporter@kernel.crashing.org>\n\nThanks, applied. I decided to go with this version instead of the\n.git/info/exclude one since I *don't* think you want to share this. The\nvery fact it is in the .git/ directory implies here that these are your\nlocal exclude patterns which are likely temporary and more importantly\nyou don't want them under version control. Therefore they aren't\nreally interesting for anyone else and should be kept per-tree. That's\nthis file's point as I view it. If you want something more persistent,\nget it to git's sight.\n\nThe fact that we have no support for version-tracked exclude file can't\nstop me! ;-)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"2839","messageId":"7vfywx2t77.fsf@assigned-by-dhcp.cox.net","threadId":"445","inReplyTo":"20050508015016.GL9495@pasky.ji.cz","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-08T23:28:44Z","receivedAt":"2005-05-08T23:28:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"PB\" == Petr Baudis <pasky@ucw.cz> writes:\n\nPB> ... since I *don't* think you want to share this. The very\nPB> fact it is in the .git/ directory implies here that these\nPB> are your local exclude patterns which are likely\nPB> temporary...\n\nIs it really the case?  I recall that Linux kernel started\nshipping with the standard dontdiff file for everybody's use\nsome time ago, after enough people wanted it included in the\nupstream release.  Maybe you would want to read from both?\n\nPB> The fact that we have no support for version-tracked exclude file can't\nPB> stop me! ;-)\n\nWhat darcs folks do is that they have a per-tree configuration\n(kept in ./_darcs, which is similar to our ./.git) that says\nwhich file is the exclude list, and by setting configuration\nitem to point at a file which _is_ version controlled they can\nshare the exclude file.\n\n"},{"id":"2842","messageId":"20050508234227.GQ9495@pasky.ji.cz","threadId":"445","inReplyTo":"7vfywx2t77.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add exclude file support to cg-status","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-08T23:42:27Z","receivedAt":"2005-05-08T23:42:27Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, May 09, 2005 at 01:28:44AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> told me that...\n> >>>>> \"PB\" == Petr Baudis <pasky@ucw.cz> writes:\n> \n> PB> ... since I *don't* think you want to share this. The very\n> PB> fact it is in the .git/ directory implies here that these\n> PB> are your local exclude patterns which are likely\n> PB> temporary...\n> \n> Is it really the case?  I recall that Linux kernel started\n> shipping with the standard dontdiff file for everybody's use\n> some time ago, after enough people wanted it included in the\n> upstream release.  Maybe you would want to read from both?\n\nOf course. You should combine them both, the .git/ one having the\nultimate precedence (if we support the CVS-like ! stuff too).\n\nThat is, in CVS the version-controlled files are per-directory, which\ncan be very nice too; things are getting harder now, though, since we\nshould have some per-project ignore file too.\n\n> PB> The fact that we have no support for version-tracked exclude file can't\n> PB> stop me! ;-)\n> \n> What darcs folks do is that they have a per-tree configuration\n> (kept in ./_darcs, which is similar to our ./.git) that says\n> which file is the exclude list, and by setting configuration\n> item to point at a file which _is_ version controlled they can\n> share the exclude file.\n\nThat is certainly a good idea (at least for kernel, where you probably\njust want to give it dontdiff), but we need a sensible default.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"}]}