{"thread":{"id":"18065","subject":"jgit and ignore","startedAt":"2009-02-28T16:31:28Z","lastAt":"2009-03-04T17:50:42Z","messageCount":23,"participants":["Jon Smirl","Shawn O. Pearce","Ferry Huberts (Pelagic)","Tor Arne Vestbø","Robin Rosenberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"106536","messageId":"9e4733910902280831j70448ce9h7239f14e13b92b76@mail.gmail.com","threadId":"18065","inReplyTo":null,"subject":"jgit and ignore","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2009-02-28T16:31:28Z","receivedAt":"2009-02-28T16:31:28Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"I'm using jgit in eclipse. Works great for me.\n\nI have a couple of generated files in my working directory. There\ndoesn't seem to be any UI for ignoring them. Is it there and I just\ncan't find it?\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"106540","messageId":"20090228172622.GC26689@spearce.org","threadId":"18065","inReplyTo":"9e4733910902280831j70448ce9h7239f14e13b92b76@mail.gmail.com","subject":"Re: jgit and ignore","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-02-28T17:26:22Z","receivedAt":"2009-02-28T17:26:22Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jon Smirl <jonsmirl@gmail.com> wrote:\n> I'm using jgit in eclipse. Works great for me.\n \nYay!\n\n> I have a couple of generated files in my working directory. There\n> doesn't seem to be any UI for ignoring them. Is it there and I just\n> can't find it?\n\nEGit doesn't (yet) honor the .gitignore files like it should. Someone\n(Ferry i-forget-the-rest-of-his-name) is working on adding ignore\nsupport and has patches in flight for at least some of it.\n\n-- \nShawn.\n"},{"id":"106597","messageId":"49AA5F64.6070207@pelagic.nl","threadId":"18065","inReplyTo":"20090228172622.GC26689@spearce.org","subject":"Re: jgit and ignore","fromName":"Ferry Huberts (Pelagic)","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-03-01T10:11:48Z","receivedAt":"2009-03-01T10:11:48Z","isPatch":false,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Shawn O. Pearce wrote:\n> Jon Smirl <jonsmirl@gmail.com> wrote:\n>> I'm using jgit in eclipse. Works great for me.\n>  \n> Yay!\n> \n>> I have a couple of generated files in my working directory. There\n>> doesn't seem to be any UI for ignoring them. Is it there and I just\n>> can't find it?\n> \n> EGit doesn't (yet) honor the .gitignore files like it should. Someone\n> (Ferry i-forget-the-rest-of-his-name) is working on adding ignore\n> support and has patches in flight for at least some of it.\n> \nFerry i-do-remember-my-name Huberts is working on it :-)\n\nI have most of it working in a basic form already but am currently\nrefactoring things to take care of some nasty little details.\nExpect something to arrive within (my best guesstimate) about 3 to 4\nweeks. after next week I'll be skiing for a week, so no coding then :-)\n\nFor the new functionality:\nYou don't really need a UI: just add a .gitignore file with a pattern\nand the plugin will pick it up and show you what is ignored by means of\na nice little decoration.\n\nFerry\n"},{"id":"106603","messageId":"9e4733910903010454u662eb5afob45f608321660500@mail.gmail.com","threadId":"18065","inReplyTo":"49AA5F64.6070207@pelagic.nl","subject":"Re: jgit and ignore","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2009-03-01T12:54:55Z","receivedAt":"2009-03-01T12:54:55Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On Sun, Mar 1, 2009 at 5:11 AM, Ferry Huberts (Pelagic)\n<ferry.huberts@pelagic.nl> wrote:\n> Shawn O. Pearce wrote:\n>> Jon Smirl <jonsmirl@gmail.com> wrote:\n>>> I'm using jgit in eclipse. Works great for me.\n>>\n>> Yay!\n>>\n>>> I have a couple of generated files in my working directory. There\n>>> doesn't seem to be any UI for ignoring them. Is it there and I just\n>>> can't find it?\n>>\n>> EGit doesn't (yet) honor the .gitignore files like it should. Someone\n>> (Ferry i-forget-the-rest-of-his-name) is working on adding ignore\n>> support and has patches in flight for at least some of it.\n>>\n> Ferry i-do-remember-my-name Huberts is working on it :-)\n>\n> I have most of it working in a basic form already but am currently\n> refactoring things to take care of some nasty little details.\n> Expect something to arrive within (my best guesstimate) about 3 to 4\n> weeks. after next week I'll be skiing for a week, so no coding then :-)\n>\n> For the new functionality:\n> You don't really need a UI: just add a .gitignore file with a pattern\n> and the plugin will pick it up and show you what is ignored by means of\n> a nice little decoration.\n\nI expected it to work by right clicking the file and picking\nteam/ignore. This would add the file name .gitignore and automatically\nadd .gitignore to my commit. It would also alter the eclipse filter to\nmake the file disappear in the eclipse browser.\n\n\n>\n> Ferry\n>\n\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"106604","messageId":"49AA884D.1050806@pelagic.nl","threadId":"18065","inReplyTo":"9e4733910903010454u662eb5afob45f608321660500@mail.gmail.com","subject":"Re: jgit and ignore","fromName":"Ferry Huberts (Pelagic)","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-03-01T13:06:21Z","receivedAt":"2009-03-01T13:06:21Z","isPatch":false,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Jon Smirl wrote:\n> On Sun, Mar 1, 2009 at 5:11 AM, Ferry Huberts (Pelagic)\n> <ferry.huberts@pelagic.nl> wrote:\n>> Shawn O. Pearce wrote:\n>>> Jon Smirl <jonsmirl@gmail.com> wrote:\n>>>> I'm using jgit in eclipse. Works great for me.\n>>> Yay!\n>>>\n>>>> I have a couple of generated files in my working directory. There\n>>>> doesn't seem to be any UI for ignoring them. Is it there and I just\n>>>> can't find it?\n>>> EGit doesn't (yet) honor the .gitignore files like it should. Someone\n>>> (Ferry i-forget-the-rest-of-his-name) is working on adding ignore\n>>> support and has patches in flight for at least some of it.\n>>>\n>> Ferry i-do-remember-my-name Huberts is working on it :-)\n>>\n>> I have most of it working in a basic form already but am currently\n>> refactoring things to take care of some nasty little details.\n>> Expect something to arrive within (my best guesstimate) about 3 to 4\n>> weeks. after next week I'll be skiing for a week, so no coding then :-)\n>>\n>> For the new functionality:\n>> You don't really need a UI: just add a .gitignore file with a pattern\n>> and the plugin will pick it up and show you what is ignored by means of\n>> a nice little decoration.\n> \n> I expected it to work by right clicking the file and picking\n> team/ignore. This would add the file name .gitignore and automatically\n> add .gitignore to my commit. It would also alter the eclipse filter to\n> make the file disappear in the eclipse browser.\n> \n\nthat'll come later, first we need to ignore the same files as git :-)\n\nwhich eclipse browser?\n\nBTW. the plugin will not look at the eclipse filter for ignore files\nonce I've finished the implementation. that's the only way to make sure\nthat we ignore resources in exactly the same way as git does: git only\nignores on the basis of .gitignore files, command line options (we do\nnot have those for the plugin), and the info/exclude file in the repository.\n"},{"id":"106605","messageId":"49AA8ECD.4090302@gmail.com","threadId":"18065","inReplyTo":"49AA884D.1050806@pelagic.nl","subject":"Re: jgit and ignore","fromName":"Tor Arne Vestbø","fromEmail":"torarnv@gmail.com","sentAt":"2009-03-01T13:34:05Z","receivedAt":"2009-03-01T13:34:05Z","isPatch":false,"sender":{"key":"torarnv@gmail.com","avatar":"https://gravatar.com/avatar/847af0150a5a28ad86d9db1556a48aba04e7642c6a29a5a767f8c2bdf1720321?d=mp&s=160"},"body":"Ferry Huberts (Pelagic) wrote:\n> BTW. the plugin will not look at the eclipse filter for ignore files\n> once I've finished the implementation. that's the only way to make sure\n> that we ignore resources in exactly the same way as git does: git only\n> ignores on the basis of .gitignore files, command line options (we do\n> not have those for the plugin), and the info/exclude file in the repository.\n\nYou're missing one: the file specified by the configuration variable\ncore.excludesfile, which can be though of as a global ignore filter.\n\nThe manual says:\n\n\"Patterns which a user wants git to ignore in all situations (e.g.,\nbackup or temporary files generated by the user's editor of choice)\ngenerally go into a file specified by core.excludesfile in the user's\n~/.gitconfig.\"\n\nThis is _exactly_ what Eclipse's Team->Ignored Resources is for.\n\nI see two groups of users: a) those with a global ignore specified in\ncore.excludesfile b) and those without (they may not even have cgit\ninstalled, if EGit is bundled with Eclipse in the future).\n\nIn my opinion, EGit should default to using Eclipse's built in ignores,\nbut then detect the presence of a global core.excludesfile, in which\ncase it would notify the user (\"I see you have a core.excludesfile\") and\nlet the user switch to using that one instead.\n\nIn other words, whether or not to use core.excludesfile or Eclipse's\nglobal team ignores should be optional, and we should provide heuristics\nfor deciding when to switch.\n\nI think that would cover both groups of users without causing confusion.\n\nTor Arne\n"},{"id":"106606","messageId":"49AA91F0.7050008@pelagic.nl","threadId":"18065","inReplyTo":"49AA8ECD.4090302@gmail.com","subject":"Re: jgit and ignore","fromName":"Ferry Huberts (Pelagic)","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-03-01T13:47:28Z","receivedAt":"2009-03-01T13:47:28Z","isPatch":false,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Tor Arne Vestbø wrote:\n> Ferry Huberts (Pelagic) wrote:\n>> BTW. the plugin will not look at the eclipse filter for ignore files\n>> once I've finished the implementation. that's the only way to make sure\n>> that we ignore resources in exactly the same way as git does: git only\n>> ignores on the basis of .gitignore files, command line options (we do\n>> not have those for the plugin), and the info/exclude file in the repository.\n> \n> You're missing one: the file specified by the configuration variable\n> core.excludesfile, which can be though of as a global ignore filter.\n> \n> The manual says:\n> \n> \"Patterns which a user wants git to ignore in all situations (e.g.,\n> backup or temporary files generated by the user's editor of choice)\n> generally go into a file specified by core.excludesfile in the user's\n> ~/.gitconfig.\"\n> \n> This is _exactly_ what Eclipse's Team->Ignored Resources is for.\n> \n> I see two groups of users: a) those with a global ignore specified in\n> core.excludesfile b) and those without (they may not even have cgit\n> installed, if EGit is bundled with Eclipse in the future).\n> \n> In my opinion, EGit should default to using Eclipse's built in ignores,\n> but then detect the presence of a global core.excludesfile, in which\n> case it would notify the user (\"I see you have a core.excludesfile\") and\n> let the user switch to using that one instead.\n> \n> In other words, whether or not to use core.excludesfile or Eclipse's\n> global team ignores should be optional, and we should provide heuristics\n> for deciding when to switch.\n> \n> I think that would cover both groups of users without causing confusion.\n> \n> Tor Arne\n\nOk, missed that one.\nI'll have to think a bit on how to incorporate that one but I think it's\ndoable in a relatively easy way.\n\nI do not agree with your propasal however.\nWe then would have different behaviour between how 'git' behaves within\nEclipse (by means of the plugin) and how 'git' behaves within the\ncommand line. That alone can cause much more confusion.\n\nYour proposal can also be implemented differently by (for example)\nbuilding a UI that allows the user to edit the global ignore file.\nThe Eclipse global team ignores simply are too broad: think of the\nsituation where I also have non-git project (like svn) in my workspace.\n"},{"id":"106608","messageId":"9e4733910903010608u1777f0d4j843f12551154f962@mail.gmail.com","threadId":"18065","inReplyTo":"49AA884D.1050806@pelagic.nl","subject":"Re: jgit and ignore","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2009-03-01T14:08:57Z","receivedAt":"2009-03-01T14:08:57Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On Sun, Mar 1, 2009 at 8:06 AM, Ferry Huberts (Pelagic)\n<ferry.huberts@pelagic.nl> wrote:\n> Jon Smirl wrote:\n>> On Sun, Mar 1, 2009 at 5:11 AM, Ferry Huberts (Pelagic)\n>> <ferry.huberts@pelagic.nl> wrote:\n>>> Shawn O. Pearce wrote:\n>>>> Jon Smirl <jonsmirl@gmail.com> wrote:\n>>>>> I'm using jgit in eclipse. Works great for me.\n>>>> Yay!\n>>>>\n>>>>> I have a couple of generated files in my working directory. There\n>>>>> doesn't seem to be any UI for ignoring them. Is it there and I just\n>>>>> can't find it?\n>>>> EGit doesn't (yet) honor the .gitignore files like it should. Someone\n>>>> (Ferry i-forget-the-rest-of-his-name) is working on adding ignore\n>>>> support and has patches in flight for at least some of it.\n>>>>\n>>> Ferry i-do-remember-my-name Huberts is working on it :-)\n>>>\n>>> I have most of it working in a basic form already but am currently\n>>> refactoring things to take care of some nasty little details.\n>>> Expect something to arrive within (my best guesstimate) about 3 to 4\n>>> weeks. after next week I'll be skiing for a week, so no coding then :-)\n>>>\n>>> For the new functionality:\n>>> You don't really need a UI: just add a .gitignore file with a pattern\n>>> and the plugin will pick it up and show you what is ignored by means of\n>>> a nice little decoration.\n>>\n>> I expected it to work by right clicking the file and picking\n>> team/ignore. This would add the file name .gitignore and automatically\n>> add .gitignore to my commit. It would also alter the eclipse filter to\n>> make the file disappear in the eclipse browser.\n>>\n>\n> that'll come later, first we need to ignore the same files as git :-)\n>\n> which eclipse browser?\n\nI have a C/C++ perspective open right now. Navigator is on the left,\neditor in the middle, outline on the right. In the navigator there are\nseveral files that should be ignored. I'd like to right click on them\nand select team/ignore. When I do that they will be ignored in git and\nalso disappear from my navigator.\n\nI also don't like how I have a global .git for all of my projects\ninstead of a .git for each project individually. (Did I select that\nwhen I first installed egit and didn't know what I was doing?) Now I'm\nin a mess and can't publish individual projects.\n\n>\n> BTW. the plugin will not look at the eclipse filter for ignore files\n> once I've finished the implementation. that's the only way to make sure\n> that we ignore resources in exactly the same way as git does: git only\n> ignores on the basis of .gitignore files, command line options (we do\n> not have those for the plugin), and the info/exclude file in the repository.\n>\n\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"106609","messageId":"49AA9A05.6010404@gmail.com","threadId":"18065","inReplyTo":"9e4733910903010608u1777f0d4j843f12551154f962@mail.gmail.com","subject":"Re: jgit and ignore","fromName":"Tor Arne Vestbø","fromEmail":"torarnv@gmail.com","sentAt":"2009-03-01T14:21:57Z","receivedAt":"2009-03-01T14:21:57Z","isPatch":false,"sender":{"key":"torarnv@gmail.com","avatar":"https://gravatar.com/avatar/847af0150a5a28ad86d9db1556a48aba04e7642c6a29a5a767f8c2bdf1720321?d=mp&s=160"},"body":"Jon Smirl wrote:\n> I have a C/C++ perspective open right now. Navigator is on the left,\n> editor in the middle, outline on the right. In the navigator there are\n> several files that should be ignored. I'd like to right click on them\n> and select team/ignore. When I do that they will be ignored in git and\n> also disappear from my navigator.\n\nThat would be Team->Add to .gitignore, as Eclipse does not have a way to\nadd files to the global ignore from context menus, but I agree, we\nshould have something like that eventually.\n\nIf we were to also remove ignored files from the views we would have to\neither add a View Filter for .git-ignored files, or for globally ignored\nfiles. Good idea for enhancement, please report in the issue tracker:\n\n    http://code.google.com/p/egit/issues/\n\n> I also don't like how I have a global .git for all of my projects\n> instead of a .git for each project individually. (Did I select that\n> when I first installed egit and didn't know what I was doing?) Now I'm\n> in a mess and can't publish individual projects.\n\nThat's a result of choosing \"Create repository in project's parent\ndirectory\" when you shared the project in Eclipse.\n\nPerhaps we should try to detect if the project is a Java (/JDT) project,\nor otherwise likely to be a \"child\"-project, where it makes sense to\nhave the repository in the parent directory?\n\nTor Arne\n"},{"id":"106610","messageId":"9e4733910903010631p51f9d4a7xddf9d823ff848bde@mail.gmail.com","threadId":"18065","inReplyTo":"49AA9A05.6010404@gmail.com","subject":"Re: jgit and ignore","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2009-03-01T14:31:44Z","receivedAt":"2009-03-01T14:31:44Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On Sun, Mar 1, 2009 at 9:21 AM, Tor Arne Vestbø <torarnv@gmail.com> wrote:\n> Jon Smirl wrote:\n>> I have a C/C++ perspective open right now. Navigator is on the left,\n>> editor in the middle, outline on the right. In the navigator there are\n>> several files that should be ignored. I'd like to right click on them\n>> and select team/ignore. When I do that they will be ignored in git and\n>> also disappear from my navigator.\n>\n> That would be Team->Add to .gitignore, as Eclipse does not have a way to\n> add files to the global ignore from context menus, but I agree, we\n> should have something like that eventually.\n>\n> If we were to also remove ignored files from the views we would have to\n> either add a View Filter for .git-ignored files, or for globally ignored\n> files. Good idea for enhancement, please report in the issue tracker:\n>\n>    http://code.google.com/p/egit/issues/\n>\n>> I also don't like how I have a global .git for all of my projects\n>> instead of a .git for each project individually. (Did I select that\n>> when I first installed egit and didn't know what I was doing?) Now I'm\n>> in a mess and can't publish individual projects.\n>\n> That's a result of choosing \"Create repository in project's parent\n> directory\" when you shared the project in Eclipse.\n>\n> Perhaps we should try to detect if the project is a Java (/JDT) project,\n> or otherwise likely to be a \"child\"-project, where it makes sense to\n> have the repository in the parent directory?\n\nMy .git got created in my workspace root. Is there ever a case where\nyou would want .git in your workspace root? If not, remove this choice\nwhen the parent directory is the workspace root.\n\n>\n> Tor Arne\n>\n>\n\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"106611","messageId":"49AA9CBB.1020406@gmail.com","threadId":"18065","inReplyTo":"9e4733910903010631p51f9d4a7xddf9d823ff848bde@mail.gmail.com","subject":"Re: jgit and ignore","fromName":"Tor Arne Vestbø","fromEmail":"torarnv@gmail.com","sentAt":"2009-03-01T14:33:31Z","receivedAt":"2009-03-01T14:33:31Z","isPatch":false,"sender":{"key":"torarnv@gmail.com","avatar":"https://gravatar.com/avatar/847af0150a5a28ad86d9db1556a48aba04e7642c6a29a5a767f8c2bdf1720321?d=mp&s=160"},"body":"Jon Smirl wrote:\n> On Sun, Mar 1, 2009 at 9:21 AM, Tor Arne Vestbø <torarnv@gmail.com> wrote:\n>> Perhaps we should try to detect if the project is a Java (/JDT) project,\n>> or otherwise likely to be a \"child\"-project, where it makes sense to\n>> have the repository in the parent directory?\n> \n> My .git got created in my workspace root. Is there ever a case where\n> you would want .git in your workspace root? If not, remove this choice\n> when the parent directory is the workspace root.\n\nThat would be one heuristics to figure out if the option should be\nenabled or disabled (or hidden) yes.\n\nCould you open an issue in the issue tracker for this?\n\n    http://code.google.com/p/egit/issues/list\n\nTor Arne\n"},{"id":"106612","messageId":"49AAA2B3.40808@gmail.com","threadId":"18065","inReplyTo":"49AA91F0.7050008@pelagic.nl","subject":"Re: jgit and ignore","fromName":"Tor Arne Vestbø","fromEmail":"torarnv@gmail.com","sentAt":"2009-03-01T14:58:59Z","receivedAt":"2009-03-01T14:58:59Z","isPatch":false,"sender":{"key":"torarnv@gmail.com","avatar":"https://gravatar.com/avatar/847af0150a5a28ad86d9db1556a48aba04e7642c6a29a5a767f8c2bdf1720321?d=mp&s=160"},"body":"Ferry Huberts (Pelagic) wrote:\n> Tor Arne Vestbø wrote:\n>> In my opinion, EGit should default to using Eclipse's built in ignores,\n>> but then detect the presence of a global core.excludesfile, in which\n>> case it would notify the user (\"I see you have a core.excludesfile\") and\n>> let the user switch to using that one instead.\n\n[snip]\n\nFirst of all, I do appreciate you working on the ignore feature :)\n\n> I do not agree with your propasal however.\n> We then would have different behaviour between how 'git' behaves within\n> Eclipse (by means of the plugin) and how 'git' behaves within the\n> command line. That alone can cause much more confusion.\n\nI see what you mean, and I agree that in general the command line git\nporcelain and the Eclipse git porcelain should work in similar ways.\n\nBut, with that said, I think of EGit as a standalone Eclipse-plugin\nimplementation of the git porcelain -- not just a wrapper around the\ncommand line porcelain.\n\nTo me that means that EGit should focus just as much on integrating with\nEclipse properly as it does on keeping command line porcelain\ninteroperability.\n\nThe core.excludesfile is one such case, and I think my proposal is a\ngood compromise.\n\n> Your proposal can also be implemented differently by (for example)\n> building a UI that allows the user to edit the global ignore file.\n\nThat would be going out of scope of Eclipse as a framework, and also\ndoes not solve the problem for those users who have a list of global\nteam ignores, and expect the Git plugin to just work with those ignores.\n\n> The Eclipse global team ignores simply are too broad: think of the\n> situation where I also have non-git project (like svn) in my workspace.\n\nNot sure I understand? Isn't that exactly why you would have Eclipse's\nglobal ignores specified in one place -- so that they could be shared\nbetween version control systems instead of replicated in each repo?\n\nLet' say you have a CVS project, a SVN project, and a Git project in\nyour workspace. The CVS and SVN projects would pick up \".bak\" as an\nignore pattern from your team ignores, but the Git project would not.\n\nTo make the Git project pick it up, you would have to either add it\n(repatedly for more than one project) to the .gitignore of that project,\nor open an editor outside of Eclipse to edit your ~/.gitconfig.\n\nEither ways seem redundant and awkward to me.\n\nTor Arne\n"},{"id":"106620","messageId":"20090301171648.GB14365@spearce.org","threadId":"18065","inReplyTo":"49AAA2B3.40808@gmail.com","subject":"Re: jgit and ignore","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-01T17:16:48Z","receivedAt":"2009-03-01T17:16:48Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Tor Arne Vestbø <torarnv@gmail.com> wrote:\n> \n> But, with that said, I think of EGit as a standalone Eclipse-plugin\n> implementation of the git porcelain -- not just a wrapper around the\n> command line porcelain.\n\nYes, exactly.  JGit is about keeping on-disk and on-network binary\ncompatability with git-core.  But we don't necessarily need to keep\nUI or behavior always the same within the porcelain that uses that\nlibrary, aka EGit.\n \n> To me that means that EGit should focus just as much on integrating with\n> Eclipse properly as it does on keeping command line porcelain\n> interoperability.\n\nYup, I agree completely.  I think Robin would too.\n \n> The core.excludesfile is one such case, and I think my proposal is a\n> good compromise.\n\nIMHO, we should honor ignores in EGit as:\n\n  per-directory .gitignore\n  per-repostiory GIT_DIR/info/exclude\n\n  per-repository core.excludesfile (yes, really, it can be per\n  repository, which overrides ~/.gitconfig setting of same)\n\n  Eclipse global team ignore patterns\n\nSkipping the core.excludesfile in favor of only the Eclipse global\nteam ignores feels wrong to me, as we may be missing something\nthe user has configured.  FWIW, I think core.excludesfile is a\nlot less frequently used then .gitignore and GIT_DIR/info/exclude.\nIf there is a core.excludesfile, the user is a pretty advanced user\nand they really want that behavior to be honored by Git poreclain.\nEGit should honor it.\n\nBut likewise with the global team ignores.  I think most people set\nup ignores in their VCS, so they are distributed to everyone on the\nproject automatically.  But if you do twiddle your own workspace\nsettings, we should honor them.\n\n-- \nShawn.\n"},{"id":"106621","messageId":"49AAC33E.6030906@pelagic.nl","threadId":"18065","inReplyTo":"49AAA2B3.40808@gmail.com","subject":"Re: jgit and ignore","fromName":"Ferry Huberts (Pelagic)","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-03-01T17:17:50Z","receivedAt":"2009-03-01T17:17:50Z","isPatch":false,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Tor Arne Vestbø wrote:\n> Ferry Huberts (Pelagic) wrote:\n>> Tor Arne Vestbø wrote:\n>>> In my opinion, EGit should default to using Eclipse's built in ignores,\n>>> but then detect the presence of a global core.excludesfile, in which\n>>> case it would notify the user (\"I see you have a core.excludesfile\") and\n>>> let the user switch to using that one instead.\n> \n> [snip]\n> \n> First of all, I do appreciate you working on the ignore feature :)\n> \n>> I do not agree with your propasal however.\n>> We then would have different behaviour between how 'git' behaves within\n>> Eclipse (by means of the plugin) and how 'git' behaves within the\n>> command line. That alone can cause much more confusion.\n> \n> I see what you mean, and I agree that in general the command line git\n> porcelain and the Eclipse git porcelain should work in similar ways.\n> \n> But, with that said, I think of EGit as a standalone Eclipse-plugin\n> implementation of the git porcelain -- not just a wrapper around the\n> command line porcelain.\n> \n> To me that means that EGit should focus just as much on integrating with\n> Eclipse properly as it does on keeping command line porcelain\n> interoperability.\n> \n> The core.excludesfile is one such case, and I think my proposal is a\n> good compromise.\n> \n\nhow about we all (especially me) think a bit better on this and solve it\nlater when I've completed the rest? That allows me to focus for now.\nI think we can easily synchronise between the eclipse global ignores and\nthe core.excludesfile when we (really) want to.\n"},{"id":"106622","messageId":"49AAC91E.1000401@gmail.com","threadId":"18065","inReplyTo":"20090301171648.GB14365@spearce.org","subject":"Re: jgit and ignore","fromName":"Tor Arne Vestbø","fromEmail":"torarnv@gmail.com","sentAt":"2009-03-01T17:42:54Z","receivedAt":"2009-03-01T17:42:54Z","isPatch":false,"sender":{"key":"torarnv@gmail.com","avatar":"https://gravatar.com/avatar/847af0150a5a28ad86d9db1556a48aba04e7642c6a29a5a767f8c2bdf1720321?d=mp&s=160"},"body":"Shawn O. Pearce wrote:\n> IMHO, we should honor ignores in EGit as:\n> \n>   per-directory .gitignore\n>   per-repostiory GIT_DIR/info/exclude\n> \n>   per-repository core.excludesfile (yes, really, it can be per\n>   repository, which overrides ~/.gitconfig setting of same)\n> \n>   Eclipse global team ignore patterns\n\nJust to be clear, I noticed you left out the global core.excludesfile\n(from ~/.gitconfig) here. I guess this intentional?\n\nOr should we combine the ignores from the global team ignores and the\nignores from the global core.excludesfile in ~/.gitconfig?\n\nEither way, I full agree that we should honor all repository ignores\n(whether they are in directory .gitignores, info/exclude, or given by\nrepository-specific core.excludesfile).\n\nTor Arne\n"},{"id":"106623","messageId":"49AAC959.70406@pelagic.nl","threadId":"18065","inReplyTo":"20090301171648.GB14365@spearce.org","subject":"Re: jgit and ignore","fromName":"Ferry Huberts (Pelagic)","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-03-01T17:43:53Z","receivedAt":"2009-03-01T17:43:53Z","isPatch":false,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"> IMHO, we should honor ignores in EGit as:\n> \n>   per-directory .gitignore\n>   per-repostiory GIT_DIR/info/exclude\n> \n>   per-repository core.excludesfile (yes, really, it can be per\n>   repository, which overrides ~/.gitconfig setting of same)\n\nwow. override? really?\n\n> \n>   Eclipse global team ignore patterns\n> \n\nso, should these then override, supplement, or something else?\nthe per-repo files (.gitignore's and info/exclude supplement eachother.\n\n\n> Skipping the core.excludesfile in favor of only the Eclipse global\n> team ignores feels wrong to me, as we may be missing something\n> the user has configured.  FWIW, I think core.excludesfile is a\n> lot less frequently used then .gitignore and GIT_DIR/info/exclude.\n> If there is a core.excludesfile, the user is a pretty advanced user\n> and they really want that behavior to be honored by Git poreclain.\n> EGit should honor it.\n\nI could also argue that an advanced user would expect Egit and git to\nbehave the same. especially for advanced features. and even more so\nbecause EGit now is very basic and to be able to use the advanced\nfeatures you have to switch to the commandline from Eclipse. making this\na very very real use-case for EGit usage.\n\nOnce we have more advanced features implemented this use-case will\nbecome less prevalent and only then I'd (personally) be more inclined to\nallow more behaviour differences\n"},{"id":"106624","messageId":"20090301174729.GC14365@spearce.org","threadId":"18065","inReplyTo":"49AAC959.70406@pelagic.nl","subject":"Re: jgit and ignore","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-01T17:47:29Z","receivedAt":"2009-03-01T17:47:29Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Ferry Huberts (Pelagic)\" <ferry.huberts@pelagic.nl> wrote:\n> > IMHO, we should honor ignores in EGit as:\n> > \n> >   per-directory .gitignore\n> >   per-repostiory GIT_DIR/info/exclude\n> > \n> >   per-repository core.excludesfile (yes, really, it can be per\n> >   repository, which overrides ~/.gitconfig setting of same)\n> \n> wow. override? really?\n\nYes.  I'd have to go back and read the git-core code again, but in\ngeneral a config setting of foo.bar in GIT_DIR/config overrides a\nfoo.bar setting in ~/.gitconfig, *unless* you use the --all flag.\n\nMost of the C code parses as though the last value seen is the\nonly value set, and GIT_DIR/config is parsed after ~/.gitconfig,\nhence it overrides.\n \n> >   Eclipse global team ignore patterns\n> \n> so, should these then override, supplement, or something else?\n> the per-repo files (.gitignore's and info/exclude supplement eachother.\n\nThey all supplement each other.  You union every entry in that list\ninto a single override set and then evaluate against that.  That list\nchanges with each directory, due to the per-directory .gitignore\npossibly changing, but otherwise its fixed for any given repository.\n \n-- \nShawn.\n"},{"id":"106625","messageId":"20090301174941.GD14365@spearce.org","threadId":"18065","inReplyTo":"49AAC91E.1000401@gmail.com","subject":"Re: jgit and ignore","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-01T17:49:41Z","receivedAt":"2009-03-01T17:49:41Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Tor Arne Vestbø <torarnv@gmail.com> wrote:\n> Shawn O. Pearce wrote:\n> > IMHO, we should honor ignores in EGit as:\n> > \n> >   per-directory .gitignore\n> >   per-repostiory GIT_DIR/info/exclude\n> > \n> >   per-repository core.excludesfile (yes, really, it can be per\n> >   repository, which overrides ~/.gitconfig setting of same)\n> > \n> >   Eclipse global team ignore patterns\n> \n> Just to be clear, I noticed you left out the global core.excludesfile\n> (from ~/.gitconfig) here. I guess this intentional?\n\nNo, I didn't.  core.excludesfile is read from the config, the config\nis a union of /etc/gitconfig, ~/.gitconfig, and GIT_DIR/config.  The\nlast setting wins.\n \n> Or should we combine the ignores from the global team ignores and the\n> ignores from the global core.excludesfile in ~/.gitconfig?\n>\n> Either way, I full agree that we should honor all repository ignores\n> (whether they are in directory .gitignores, info/exclude, or given by\n> repository-specific core.excludesfile).\n\nRight.  See my reply to Ferry, we union all of them together, but in\nthe case of core.excludesfile we have to honor what the repository\nis telling us is the correct setting for that one repository,\nwhich may differ from other repositories if it has been overridden.\n\n-- \nShawn.\n"},{"id":"106627","messageId":"49AACB3A.8070809@gmail.com","threadId":"18065","inReplyTo":"20090301174941.GD14365@spearce.org","subject":"Re: jgit and ignore","fromName":"Tor Arne Vestbø","fromEmail":"torarnv@gmail.com","sentAt":"2009-03-01T17:51:54Z","receivedAt":"2009-03-01T17:51:54Z","isPatch":false,"sender":{"key":"torarnv@gmail.com","avatar":"https://gravatar.com/avatar/847af0150a5a28ad86d9db1556a48aba04e7642c6a29a5a767f8c2bdf1720321?d=mp&s=160"},"body":"Shawn O. Pearce wrote:\n>> Just to be clear, I noticed you left out the global core.excludesfile\n>> (from ~/.gitconfig) here. I guess this intentional?\n> \n> No, I didn't.  core.excludesfile is read from the config, the config\n> is a union of /etc/gitconfig, ~/.gitconfig, and GIT_DIR/config.  The\n> last setting wins.\n\nAh, I see, I thought each config was read in a separate steps. Thanks\nfor clearing that up.\n\n>> Either way, I full agree that we should honor all repository ignores\n>> (whether they are in directory .gitignores, info/exclude, or given by\n>> repository-specific core.excludesfile).\n> \n> Right.  See my reply to Ferry, we union all of them together, but in\n> the case of core.excludesfile we have to honor what the repository\n> is telling us is the correct setting for that one repository,\n> which may differ from other repositories if it has been overridden.\n\nYepp, full ack.\n\n\nTor Arne\n"},{"id":"106628","messageId":"20090301175705.GE14365@spearce.org","threadId":"18065","inReplyTo":"49AACB3A.8070809@gmail.com","subject":"Re: jgit and ignore","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-01T17:57:05Z","receivedAt":"2009-03-01T17:57:05Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Tor Arne Vestbø <torarnv@gmail.com> wrote:\n> Shawn O. Pearce wrote:\n> >> Just to be clear, I noticed you left out the global core.excludesfile\n> >> (from ~/.gitconfig) here. I guess this intentional?\n> > \n> > No, I didn't.  core.excludesfile is read from the config, the config\n> > is a union of /etc/gitconfig, ~/.gitconfig, and GIT_DIR/config.  The\n> > last setting wins.\n> \n> Ah, I see, I thought each config was read in a separate steps. Thanks\n> for clearing that up.\n\nWell, they are.\n\nBut in git-core the value is pulled into a single static.  For a\nstring its often a single static char*.  So the config handle\nfunction is called up to 3 times for foo.bar, and the last one to\nbe called is the one that finally set the value.  They are read\nin the order I described above, so GIT_DIR/config has a chance to\noverride any prior setting.\n\nIn JGit the RepositoryConfig object parses the other direction.\nIts a more classical \"default\" pattern, where if GIT_DIR/config\ndoesn't have a foo.bar we call to another instance which had parsed\n~/.gitconfig, and so on.\n\nEither way produces the same result.\n\n-- \nShawn.\n"},{"id":"106633","messageId":"200903012124.46600.robin.rosenberg.lists@dewire.com","threadId":"18065","inReplyTo":"20090301171648.GB14365@spearce.org","subject":"Re: jgit and ignore","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2009-03-01T20:24:45Z","receivedAt":"2009-03-01T20:24:45Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Shawn writes:\n> Tor Arne Vestbø <torarnv@gmail.com> wrote:\n> > To me that means that EGit should focus just as much on integrating with\n> > Eclipse properly as it does on keeping command line porcelain\n> > interoperability.\n> \n> Yup, I agree completely.  I think Robin would too.\n100% (or close).\n\n-- robin\n"},{"id":"106640","messageId":"200903012147.26590.robin.rosenberg.lists@dewire.com","threadId":"18065","inReplyTo":"9e4733910903010631p51f9d4a7xddf9d823ff848bde@mail.gmail.com","subject":"Re: jgit and ignore","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2009-03-01T20:47:25Z","receivedAt":"2009-03-01T20:47:25Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Jon Smirl writes:\n> My .git got created in my workspace root. Is there ever a case where\n> you would want .git in your workspace root? If not, remove this choice\n> when the parent directory is the workspace root.\n\nSure there is. If you create your projects in the workspace, and in particular,\ndirectly beneath the workspace root, having the .git directory there is a logical \nchoice. I generally try to create the projects outside the workspace, but Eclipse\nseems keen on creating projects in the workspace, but that is just my personal\npreferences and partly for historical reasons.\n\n-- robin\n"},{"id":"106994","messageId":"49AEBF72.3030901@pelagic.nl","threadId":"18065","inReplyTo":"200903012124.46600.robin.rosenberg.lists@dewire.com","subject":"Re: jgit and ignore","fromName":"Ferry Huberts (Pelagic)","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-03-04T17:50:42Z","receivedAt":"2009-03-04T17:50:42Z","isPatch":false,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Robin Rosenberg wrote:\n> Shawn writes:\n>> Tor Arne Vestbø <torarnv@gmail.com> wrote:\n>>> To me that means that EGit should focus just as much on integrating with\n>>> Eclipse properly as it does on keeping command line porcelain\n>>> interoperability.\n>> Yup, I agree completely.  I think Robin would too.\n> 100% (or close).\n> \n\nHey guys\n\nI'm currently refactoring the code to accomodate all of your wishes and \nI've already come a long way.\n\n==> The one thing that I still need to do is get to the global \ncore.excludefile setting. How can I do that?\n\n\nHow will it work? Read on... :-)\n\nSuppose we have FILE in DIRECTORY and we want to see whether FILE is \nignored. (FILE can ofcourse also be a DIR)\n\nThe way in which ignores will be evaluated is:\n1- See if there is a .gitignore file in DIRECTORY. if so, try to match. \nwhen a match is found: FILE is ignored. if there is no .gitignore file or \nwhen no match is found: go one directory up (towards the checkout \nroot/workdir) and repeat until a match is found or until the .gitignore in \nthe checkout root/workdir has been evaluated.\n2- use the patterns from .git/info/exclude (if exists) and try to match. \nwhen a match is found: FILE is ignored.\n3- use the patterns from .git/config:core.excludesfile (when set) and try \nto match. when a match is found: FILE is ignored.\n4- when .git/config:core.excludesfile was not set, use the patterns from\nglobal:core.excludesfile (when set) and try to match. when a match is \nfound: FILE is ignored.\n5- try to match against the Eclipse global Team ignores. when a match is \nfound: FILE is ignored.\n6- FILE is not ignored\n\n\nhope this flow is what you want :-)\n\nFerry\n"}]}