* jgit and ignore @ 2009-02-28 16:31 Jon Smirl 2009-02-28 17:26 ` Shawn O. Pearce 0 siblings, 1 reply; 23+ messages in thread From: Jon Smirl @ 2009-02-28 16:31 UTC (permalink / raw) To: Git Mailing List, Shawn O. Pearce I'm using jgit in eclipse. Works great for me. I have a couple of generated files in my working directory. There doesn't seem to be any UI for ignoring them. Is it there and I just can't find it? -- Jon Smirl jonsmirl@gmail.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-02-28 16:31 jgit and ignore Jon Smirl @ 2009-02-28 17:26 ` Shawn O. Pearce 2009-03-01 10:11 ` Ferry Huberts (Pelagic) 0 siblings, 1 reply; 23+ messages in thread From: Shawn O. Pearce @ 2009-02-28 17:26 UTC (permalink / raw) To: Jon Smirl; +Cc: Git Mailing List Jon Smirl <jonsmirl@gmail.com> wrote: > I'm using jgit in eclipse. Works great for me. Yay! > I have a couple of generated files in my working directory. There > doesn't seem to be any UI for ignoring them. Is it there and I just > can't find it? EGit doesn't (yet) honor the .gitignore files like it should. Someone (Ferry i-forget-the-rest-of-his-name) is working on adding ignore support and has patches in flight for at least some of it. -- Shawn. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-02-28 17:26 ` Shawn O. Pearce @ 2009-03-01 10:11 ` Ferry Huberts (Pelagic) 2009-03-01 12:54 ` Jon Smirl 0 siblings, 1 reply; 23+ messages in thread From: Ferry Huberts (Pelagic) @ 2009-03-01 10:11 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: Jon Smirl, Git Mailing List Shawn O. Pearce wrote: > Jon Smirl <jonsmirl@gmail.com> wrote: >> I'm using jgit in eclipse. Works great for me. > > Yay! > >> I have a couple of generated files in my working directory. There >> doesn't seem to be any UI for ignoring them. Is it there and I just >> can't find it? > > EGit doesn't (yet) honor the .gitignore files like it should. Someone > (Ferry i-forget-the-rest-of-his-name) is working on adding ignore > support and has patches in flight for at least some of it. > Ferry i-do-remember-my-name Huberts is working on it :-) I have most of it working in a basic form already but am currently refactoring things to take care of some nasty little details. Expect something to arrive within (my best guesstimate) about 3 to 4 weeks. after next week I'll be skiing for a week, so no coding then :-) For the new functionality: You don't really need a UI: just add a .gitignore file with a pattern and the plugin will pick it up and show you what is ignored by means of a nice little decoration. Ferry ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 10:11 ` Ferry Huberts (Pelagic) @ 2009-03-01 12:54 ` Jon Smirl 2009-03-01 13:06 ` Ferry Huberts (Pelagic) 0 siblings, 1 reply; 23+ messages in thread From: Jon Smirl @ 2009-03-01 12:54 UTC (permalink / raw) To: Ferry Huberts (Pelagic); +Cc: Shawn O. Pearce, Git Mailing List On Sun, Mar 1, 2009 at 5:11 AM, Ferry Huberts (Pelagic) <ferry.huberts@pelagic.nl> wrote: > Shawn O. Pearce wrote: >> Jon Smirl <jonsmirl@gmail.com> wrote: >>> I'm using jgit in eclipse. Works great for me. >> >> Yay! >> >>> I have a couple of generated files in my working directory. There >>> doesn't seem to be any UI for ignoring them. Is it there and I just >>> can't find it? >> >> EGit doesn't (yet) honor the .gitignore files like it should. Someone >> (Ferry i-forget-the-rest-of-his-name) is working on adding ignore >> support and has patches in flight for at least some of it. >> > Ferry i-do-remember-my-name Huberts is working on it :-) > > I have most of it working in a basic form already but am currently > refactoring things to take care of some nasty little details. > Expect something to arrive within (my best guesstimate) about 3 to 4 > weeks. after next week I'll be skiing for a week, so no coding then :-) > > For the new functionality: > You don't really need a UI: just add a .gitignore file with a pattern > and the plugin will pick it up and show you what is ignored by means of > a nice little decoration. I expected it to work by right clicking the file and picking team/ignore. This would add the file name .gitignore and automatically add .gitignore to my commit. It would also alter the eclipse filter to make the file disappear in the eclipse browser. > > Ferry > -- Jon Smirl jonsmirl@gmail.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 12:54 ` Jon Smirl @ 2009-03-01 13:06 ` Ferry Huberts (Pelagic) 2009-03-01 13:34 ` Tor Arne Vestbø 2009-03-01 14:08 ` Jon Smirl 0 siblings, 2 replies; 23+ messages in thread From: Ferry Huberts (Pelagic) @ 2009-03-01 13:06 UTC (permalink / raw) To: Jon Smirl; +Cc: Shawn O. Pearce, Git Mailing List Jon Smirl wrote: > On Sun, Mar 1, 2009 at 5:11 AM, Ferry Huberts (Pelagic) > <ferry.huberts@pelagic.nl> wrote: >> Shawn O. Pearce wrote: >>> Jon Smirl <jonsmirl@gmail.com> wrote: >>>> I'm using jgit in eclipse. Works great for me. >>> Yay! >>> >>>> I have a couple of generated files in my working directory. There >>>> doesn't seem to be any UI for ignoring them. Is it there and I just >>>> can't find it? >>> EGit doesn't (yet) honor the .gitignore files like it should. Someone >>> (Ferry i-forget-the-rest-of-his-name) is working on adding ignore >>> support and has patches in flight for at least some of it. >>> >> Ferry i-do-remember-my-name Huberts is working on it :-) >> >> I have most of it working in a basic form already but am currently >> refactoring things to take care of some nasty little details. >> Expect something to arrive within (my best guesstimate) about 3 to 4 >> weeks. after next week I'll be skiing for a week, so no coding then :-) >> >> For the new functionality: >> You don't really need a UI: just add a .gitignore file with a pattern >> and the plugin will pick it up and show you what is ignored by means of >> a nice little decoration. > > I expected it to work by right clicking the file and picking > team/ignore. This would add the file name .gitignore and automatically > add .gitignore to my commit. It would also alter the eclipse filter to > make the file disappear in the eclipse browser. > that'll come later, first we need to ignore the same files as git :-) which eclipse browser? BTW. the plugin will not look at the eclipse filter for ignore files once I've finished the implementation. that's the only way to make sure that we ignore resources in exactly the same way as git does: git only ignores on the basis of .gitignore files, command line options (we do not have those for the plugin), and the info/exclude file in the repository. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 13:06 ` Ferry Huberts (Pelagic) @ 2009-03-01 13:34 ` Tor Arne Vestbø 2009-03-01 13:47 ` Ferry Huberts (Pelagic) 2009-03-01 14:08 ` Jon Smirl 1 sibling, 1 reply; 23+ messages in thread From: Tor Arne Vestbø @ 2009-03-01 13:34 UTC (permalink / raw) To: Ferry Huberts (Pelagic); +Cc: Jon Smirl, Shawn O. Pearce, Git Mailing List Ferry Huberts (Pelagic) wrote: > BTW. the plugin will not look at the eclipse filter for ignore files > once I've finished the implementation. that's the only way to make sure > that we ignore resources in exactly the same way as git does: git only > ignores on the basis of .gitignore files, command line options (we do > not have those for the plugin), and the info/exclude file in the repository. You're missing one: the file specified by the configuration variable core.excludesfile, which can be though of as a global ignore filter. The manual says: "Patterns which a user wants git to ignore in all situations (e.g., backup or temporary files generated by the user's editor of choice) generally go into a file specified by core.excludesfile in the user's ~/.gitconfig." This is _exactly_ what Eclipse's Team->Ignored Resources is for. I see two groups of users: a) those with a global ignore specified in core.excludesfile b) and those without (they may not even have cgit installed, if EGit is bundled with Eclipse in the future). In my opinion, EGit should default to using Eclipse's built in ignores, but then detect the presence of a global core.excludesfile, in which case it would notify the user ("I see you have a core.excludesfile") and let the user switch to using that one instead. In other words, whether or not to use core.excludesfile or Eclipse's global team ignores should be optional, and we should provide heuristics for deciding when to switch. I think that would cover both groups of users without causing confusion. Tor Arne ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 13:34 ` Tor Arne Vestbø @ 2009-03-01 13:47 ` Ferry Huberts (Pelagic) 2009-03-01 14:58 ` Tor Arne Vestbø 0 siblings, 1 reply; 23+ messages in thread From: Ferry Huberts (Pelagic) @ 2009-03-01 13:47 UTC (permalink / raw) To: Tor Arne Vestbø; +Cc: Jon Smirl, Shawn O. Pearce, Git Mailing List Tor Arne Vestbø wrote: > Ferry Huberts (Pelagic) wrote: >> BTW. the plugin will not look at the eclipse filter for ignore files >> once I've finished the implementation. that's the only way to make sure >> that we ignore resources in exactly the same way as git does: git only >> ignores on the basis of .gitignore files, command line options (we do >> not have those for the plugin), and the info/exclude file in the repository. > > You're missing one: the file specified by the configuration variable > core.excludesfile, which can be though of as a global ignore filter. > > The manual says: > > "Patterns which a user wants git to ignore in all situations (e.g., > backup or temporary files generated by the user's editor of choice) > generally go into a file specified by core.excludesfile in the user's > ~/.gitconfig." > > This is _exactly_ what Eclipse's Team->Ignored Resources is for. > > I see two groups of users: a) those with a global ignore specified in > core.excludesfile b) and those without (they may not even have cgit > installed, if EGit is bundled with Eclipse in the future). > > In my opinion, EGit should default to using Eclipse's built in ignores, > but then detect the presence of a global core.excludesfile, in which > case it would notify the user ("I see you have a core.excludesfile") and > let the user switch to using that one instead. > > In other words, whether or not to use core.excludesfile or Eclipse's > global team ignores should be optional, and we should provide heuristics > for deciding when to switch. > > I think that would cover both groups of users without causing confusion. > > Tor Arne Ok, missed that one. I'll have to think a bit on how to incorporate that one but I think it's doable in a relatively easy way. I do not agree with your propasal however. We then would have different behaviour between how 'git' behaves within Eclipse (by means of the plugin) and how 'git' behaves within the command line. That alone can cause much more confusion. Your proposal can also be implemented differently by (for example) building a UI that allows the user to edit the global ignore file. The Eclipse global team ignores simply are too broad: think of the situation where I also have non-git project (like svn) in my workspace. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 13:47 ` Ferry Huberts (Pelagic) @ 2009-03-01 14:58 ` Tor Arne Vestbø 2009-03-01 17:16 ` Shawn O. Pearce 2009-03-01 17:17 ` Ferry Huberts (Pelagic) 0 siblings, 2 replies; 23+ messages in thread From: Tor Arne Vestbø @ 2009-03-01 14:58 UTC (permalink / raw) To: Ferry Huberts (Pelagic); +Cc: Jon Smirl, Shawn O. Pearce, Git Mailing List Ferry Huberts (Pelagic) wrote: > Tor Arne Vestbø wrote: >> In my opinion, EGit should default to using Eclipse's built in ignores, >> but then detect the presence of a global core.excludesfile, in which >> case it would notify the user ("I see you have a core.excludesfile") and >> let the user switch to using that one instead. [snip] First of all, I do appreciate you working on the ignore feature :) > I do not agree with your propasal however. > We then would have different behaviour between how 'git' behaves within > Eclipse (by means of the plugin) and how 'git' behaves within the > command line. That alone can cause much more confusion. I see what you mean, and I agree that in general the command line git porcelain and the Eclipse git porcelain should work in similar ways. But, with that said, I think of EGit as a standalone Eclipse-plugin implementation of the git porcelain -- not just a wrapper around the command line porcelain. To me that means that EGit should focus just as much on integrating with Eclipse properly as it does on keeping command line porcelain interoperability. The core.excludesfile is one such case, and I think my proposal is a good compromise. > Your proposal can also be implemented differently by (for example) > building a UI that allows the user to edit the global ignore file. That would be going out of scope of Eclipse as a framework, and also does not solve the problem for those users who have a list of global team ignores, and expect the Git plugin to just work with those ignores. > The Eclipse global team ignores simply are too broad: think of the > situation where I also have non-git project (like svn) in my workspace. Not sure I understand? Isn't that exactly why you would have Eclipse's global ignores specified in one place -- so that they could be shared between version control systems instead of replicated in each repo? Let' say you have a CVS project, a SVN project, and a Git project in your workspace. The CVS and SVN projects would pick up ".bak" as an ignore pattern from your team ignores, but the Git project would not. To make the Git project pick it up, you would have to either add it (repatedly for more than one project) to the .gitignore of that project, or open an editor outside of Eclipse to edit your ~/.gitconfig. Either ways seem redundant and awkward to me. Tor Arne ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 14:58 ` Tor Arne Vestbø @ 2009-03-01 17:16 ` Shawn O. Pearce 2009-03-01 17:42 ` Tor Arne Vestbø ` (2 more replies) 2009-03-01 17:17 ` Ferry Huberts (Pelagic) 1 sibling, 3 replies; 23+ messages in thread From: Shawn O. Pearce @ 2009-03-01 17:16 UTC (permalink / raw) To: Tor Arne Vestbø; +Cc: Ferry Huberts (Pelagic), Jon Smirl, Git Mailing List Tor Arne Vestbø <torarnv@gmail.com> wrote: > > But, with that said, I think of EGit as a standalone Eclipse-plugin > implementation of the git porcelain -- not just a wrapper around the > command line porcelain. Yes, exactly. JGit is about keeping on-disk and on-network binary compatability with git-core. But we don't necessarily need to keep UI or behavior always the same within the porcelain that uses that library, aka EGit. > To me that means that EGit should focus just as much on integrating with > Eclipse properly as it does on keeping command line porcelain > interoperability. Yup, I agree completely. I think Robin would too. > The core.excludesfile is one such case, and I think my proposal is a > good compromise. IMHO, we should honor ignores in EGit as: per-directory .gitignore per-repostiory GIT_DIR/info/exclude per-repository core.excludesfile (yes, really, it can be per repository, which overrides ~/.gitconfig setting of same) Eclipse global team ignore patterns Skipping the core.excludesfile in favor of only the Eclipse global team ignores feels wrong to me, as we may be missing something the user has configured. FWIW, I think core.excludesfile is a lot less frequently used then .gitignore and GIT_DIR/info/exclude. If there is a core.excludesfile, the user is a pretty advanced user and they really want that behavior to be honored by Git poreclain. EGit should honor it. But likewise with the global team ignores. I think most people set up ignores in their VCS, so they are distributed to everyone on the project automatically. But if you do twiddle your own workspace settings, we should honor them. -- Shawn. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 17:16 ` Shawn O. Pearce @ 2009-03-01 17:42 ` Tor Arne Vestbø 2009-03-01 17:49 ` Shawn O. Pearce 2009-03-01 17:43 ` Ferry Huberts (Pelagic) 2009-03-01 20:24 ` Robin Rosenberg 2 siblings, 1 reply; 23+ messages in thread From: Tor Arne Vestbø @ 2009-03-01 17:42 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: Ferry Huberts (Pelagic), Jon Smirl, Git Mailing List Shawn O. Pearce wrote: > IMHO, we should honor ignores in EGit as: > > per-directory .gitignore > per-repostiory GIT_DIR/info/exclude > > per-repository core.excludesfile (yes, really, it can be per > repository, which overrides ~/.gitconfig setting of same) > > Eclipse global team ignore patterns Just to be clear, I noticed you left out the global core.excludesfile (from ~/.gitconfig) here. I guess this intentional? Or should we combine the ignores from the global team ignores and the ignores from the global core.excludesfile in ~/.gitconfig? Either way, I full agree that we should honor all repository ignores (whether they are in directory .gitignores, info/exclude, or given by repository-specific core.excludesfile). Tor Arne ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 17:42 ` Tor Arne Vestbø @ 2009-03-01 17:49 ` Shawn O. Pearce 2009-03-01 17:51 ` Tor Arne Vestbø 0 siblings, 1 reply; 23+ messages in thread From: Shawn O. Pearce @ 2009-03-01 17:49 UTC (permalink / raw) To: Tor Arne Vestbø; +Cc: Ferry Huberts (Pelagic), Jon Smirl, Git Mailing List Tor Arne Vestbø <torarnv@gmail.com> wrote: > Shawn O. Pearce wrote: > > IMHO, we should honor ignores in EGit as: > > > > per-directory .gitignore > > per-repostiory GIT_DIR/info/exclude > > > > per-repository core.excludesfile (yes, really, it can be per > > repository, which overrides ~/.gitconfig setting of same) > > > > Eclipse global team ignore patterns > > Just to be clear, I noticed you left out the global core.excludesfile > (from ~/.gitconfig) here. I guess this intentional? No, I didn't. core.excludesfile is read from the config, the config is a union of /etc/gitconfig, ~/.gitconfig, and GIT_DIR/config. The last setting wins. > Or should we combine the ignores from the global team ignores and the > ignores from the global core.excludesfile in ~/.gitconfig? > > Either way, I full agree that we should honor all repository ignores > (whether they are in directory .gitignores, info/exclude, or given by > repository-specific core.excludesfile). Right. See my reply to Ferry, we union all of them together, but in the case of core.excludesfile we have to honor what the repository is telling us is the correct setting for that one repository, which may differ from other repositories if it has been overridden. -- Shawn. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 17:49 ` Shawn O. Pearce @ 2009-03-01 17:51 ` Tor Arne Vestbø 2009-03-01 17:57 ` Shawn O. Pearce 0 siblings, 1 reply; 23+ messages in thread From: Tor Arne Vestbø @ 2009-03-01 17:51 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: Ferry Huberts (Pelagic), Jon Smirl, Git Mailing List Shawn O. Pearce wrote: >> Just to be clear, I noticed you left out the global core.excludesfile >> (from ~/.gitconfig) here. I guess this intentional? > > No, I didn't. core.excludesfile is read from the config, the config > is a union of /etc/gitconfig, ~/.gitconfig, and GIT_DIR/config. The > last setting wins. Ah, I see, I thought each config was read in a separate steps. Thanks for clearing that up. >> Either way, I full agree that we should honor all repository ignores >> (whether they are in directory .gitignores, info/exclude, or given by >> repository-specific core.excludesfile). > > Right. See my reply to Ferry, we union all of them together, but in > the case of core.excludesfile we have to honor what the repository > is telling us is the correct setting for that one repository, > which may differ from other repositories if it has been overridden. Yepp, full ack. Tor Arne ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 17:51 ` Tor Arne Vestbø @ 2009-03-01 17:57 ` Shawn O. Pearce 0 siblings, 0 replies; 23+ messages in thread From: Shawn O. Pearce @ 2009-03-01 17:57 UTC (permalink / raw) To: Tor Arne Vestbø; +Cc: Ferry Huberts (Pelagic), Jon Smirl, Git Mailing List Tor Arne Vestbø <torarnv@gmail.com> wrote: > Shawn O. Pearce wrote: > >> Just to be clear, I noticed you left out the global core.excludesfile > >> (from ~/.gitconfig) here. I guess this intentional? > > > > No, I didn't. core.excludesfile is read from the config, the config > > is a union of /etc/gitconfig, ~/.gitconfig, and GIT_DIR/config. The > > last setting wins. > > Ah, I see, I thought each config was read in a separate steps. Thanks > for clearing that up. Well, they are. But in git-core the value is pulled into a single static. For a string its often a single static char*. So the config handle function is called up to 3 times for foo.bar, and the last one to be called is the one that finally set the value. They are read in the order I described above, so GIT_DIR/config has a chance to override any prior setting. In JGit the RepositoryConfig object parses the other direction. Its a more classical "default" pattern, where if GIT_DIR/config doesn't have a foo.bar we call to another instance which had parsed ~/.gitconfig, and so on. Either way produces the same result. -- Shawn. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 17:16 ` Shawn O. Pearce 2009-03-01 17:42 ` Tor Arne Vestbø @ 2009-03-01 17:43 ` Ferry Huberts (Pelagic) 2009-03-01 17:47 ` Shawn O. Pearce 2009-03-01 20:24 ` Robin Rosenberg 2 siblings, 1 reply; 23+ messages in thread From: Ferry Huberts (Pelagic) @ 2009-03-01 17:43 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: Tor Arne Vestbø, Jon Smirl, Git Mailing List > IMHO, we should honor ignores in EGit as: > > per-directory .gitignore > per-repostiory GIT_DIR/info/exclude > > per-repository core.excludesfile (yes, really, it can be per > repository, which overrides ~/.gitconfig setting of same) wow. override? really? > > Eclipse global team ignore patterns > so, should these then override, supplement, or something else? the per-repo files (.gitignore's and info/exclude supplement eachother. > Skipping the core.excludesfile in favor of only the Eclipse global > team ignores feels wrong to me, as we may be missing something > the user has configured. FWIW, I think core.excludesfile is a > lot less frequently used then .gitignore and GIT_DIR/info/exclude. > If there is a core.excludesfile, the user is a pretty advanced user > and they really want that behavior to be honored by Git poreclain. > EGit should honor it. I could also argue that an advanced user would expect Egit and git to behave the same. especially for advanced features. and even more so because EGit now is very basic and to be able to use the advanced features you have to switch to the commandline from Eclipse. making this a very very real use-case for EGit usage. Once we have more advanced features implemented this use-case will become less prevalent and only then I'd (personally) be more inclined to allow more behaviour differences ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 17:43 ` Ferry Huberts (Pelagic) @ 2009-03-01 17:47 ` Shawn O. Pearce 0 siblings, 0 replies; 23+ messages in thread From: Shawn O. Pearce @ 2009-03-01 17:47 UTC (permalink / raw) To: Ferry Huberts (Pelagic); +Cc: Tor Arne Vestbø, Jon Smirl, Git Mailing List "Ferry Huberts (Pelagic)" <ferry.huberts@pelagic.nl> wrote: > > IMHO, we should honor ignores in EGit as: > > > > per-directory .gitignore > > per-repostiory GIT_DIR/info/exclude > > > > per-repository core.excludesfile (yes, really, it can be per > > repository, which overrides ~/.gitconfig setting of same) > > wow. override? really? Yes. I'd have to go back and read the git-core code again, but in general a config setting of foo.bar in GIT_DIR/config overrides a foo.bar setting in ~/.gitconfig, *unless* you use the --all flag. Most of the C code parses as though the last value seen is the only value set, and GIT_DIR/config is parsed after ~/.gitconfig, hence it overrides. > > Eclipse global team ignore patterns > > so, should these then override, supplement, or something else? > the per-repo files (.gitignore's and info/exclude supplement eachother. They all supplement each other. You union every entry in that list into a single override set and then evaluate against that. That list changes with each directory, due to the per-directory .gitignore possibly changing, but otherwise its fixed for any given repository. -- Shawn. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 17:16 ` Shawn O. Pearce 2009-03-01 17:42 ` Tor Arne Vestbø 2009-03-01 17:43 ` Ferry Huberts (Pelagic) @ 2009-03-01 20:24 ` Robin Rosenberg 2009-03-04 17:50 ` Ferry Huberts (Pelagic) 2 siblings, 1 reply; 23+ messages in thread From: Robin Rosenberg @ 2009-03-01 20:24 UTC (permalink / raw) To: Shawn O. Pearce Cc: Tor Arne Vestbø, Ferry Huberts (Pelagic), Jon Smirl, Git Mailing List Shawn writes: > Tor Arne Vestbø <torarnv@gmail.com> wrote: > > To me that means that EGit should focus just as much on integrating with > > Eclipse properly as it does on keeping command line porcelain > > interoperability. > > Yup, I agree completely. I think Robin would too. 100% (or close). -- robin ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 20:24 ` Robin Rosenberg @ 2009-03-04 17:50 ` Ferry Huberts (Pelagic) 0 siblings, 0 replies; 23+ messages in thread From: Ferry Huberts (Pelagic) @ 2009-03-04 17:50 UTC (permalink / raw) To: Robin Rosenberg; +Cc: Shawn O. Pearce, Tor Arne Vestbø, Git Mailing List Robin Rosenberg wrote: > Shawn writes: >> Tor Arne Vestbø <torarnv@gmail.com> wrote: >>> To me that means that EGit should focus just as much on integrating with >>> Eclipse properly as it does on keeping command line porcelain >>> interoperability. >> Yup, I agree completely. I think Robin would too. > 100% (or close). > Hey guys I'm currently refactoring the code to accomodate all of your wishes and I've already come a long way. ==> The one thing that I still need to do is get to the global core.excludefile setting. How can I do that? How will it work? Read on... :-) Suppose we have FILE in DIRECTORY and we want to see whether FILE is ignored. (FILE can ofcourse also be a DIR) The way in which ignores will be evaluated is: 1- See if there is a .gitignore file in DIRECTORY. if so, try to match. when a match is found: FILE is ignored. if there is no .gitignore file or when no match is found: go one directory up (towards the checkout root/workdir) and repeat until a match is found or until the .gitignore in the checkout root/workdir has been evaluated. 2- use the patterns from .git/info/exclude (if exists) and try to match. when a match is found: FILE is ignored. 3- use the patterns from .git/config:core.excludesfile (when set) and try to match. when a match is found: FILE is ignored. 4- when .git/config:core.excludesfile was not set, use the patterns from global:core.excludesfile (when set) and try to match. when a match is found: FILE is ignored. 5- try to match against the Eclipse global Team ignores. when a match is found: FILE is ignored. 6- FILE is not ignored hope this flow is what you want :-) Ferry ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 14:58 ` Tor Arne Vestbø 2009-03-01 17:16 ` Shawn O. Pearce @ 2009-03-01 17:17 ` Ferry Huberts (Pelagic) 1 sibling, 0 replies; 23+ messages in thread From: Ferry Huberts (Pelagic) @ 2009-03-01 17:17 UTC (permalink / raw) To: Tor Arne Vestbø; +Cc: Jon Smirl, Shawn O. Pearce, Git Mailing List Tor Arne Vestbø wrote: > Ferry Huberts (Pelagic) wrote: >> Tor Arne Vestbø wrote: >>> In my opinion, EGit should default to using Eclipse's built in ignores, >>> but then detect the presence of a global core.excludesfile, in which >>> case it would notify the user ("I see you have a core.excludesfile") and >>> let the user switch to using that one instead. > > [snip] > > First of all, I do appreciate you working on the ignore feature :) > >> I do not agree with your propasal however. >> We then would have different behaviour between how 'git' behaves within >> Eclipse (by means of the plugin) and how 'git' behaves within the >> command line. That alone can cause much more confusion. > > I see what you mean, and I agree that in general the command line git > porcelain and the Eclipse git porcelain should work in similar ways. > > But, with that said, I think of EGit as a standalone Eclipse-plugin > implementation of the git porcelain -- not just a wrapper around the > command line porcelain. > > To me that means that EGit should focus just as much on integrating with > Eclipse properly as it does on keeping command line porcelain > interoperability. > > The core.excludesfile is one such case, and I think my proposal is a > good compromise. > how about we all (especially me) think a bit better on this and solve it later when I've completed the rest? That allows me to focus for now. I think we can easily synchronise between the eclipse global ignores and the core.excludesfile when we (really) want to. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 13:06 ` Ferry Huberts (Pelagic) 2009-03-01 13:34 ` Tor Arne Vestbø @ 2009-03-01 14:08 ` Jon Smirl 2009-03-01 14:21 ` Tor Arne Vestbø 1 sibling, 1 reply; 23+ messages in thread From: Jon Smirl @ 2009-03-01 14:08 UTC (permalink / raw) To: Ferry Huberts (Pelagic); +Cc: Shawn O. Pearce, Git Mailing List On Sun, Mar 1, 2009 at 8:06 AM, Ferry Huberts (Pelagic) <ferry.huberts@pelagic.nl> wrote: > Jon Smirl wrote: >> On Sun, Mar 1, 2009 at 5:11 AM, Ferry Huberts (Pelagic) >> <ferry.huberts@pelagic.nl> wrote: >>> Shawn O. Pearce wrote: >>>> Jon Smirl <jonsmirl@gmail.com> wrote: >>>>> I'm using jgit in eclipse. Works great for me. >>>> Yay! >>>> >>>>> I have a couple of generated files in my working directory. There >>>>> doesn't seem to be any UI for ignoring them. Is it there and I just >>>>> can't find it? >>>> EGit doesn't (yet) honor the .gitignore files like it should. Someone >>>> (Ferry i-forget-the-rest-of-his-name) is working on adding ignore >>>> support and has patches in flight for at least some of it. >>>> >>> Ferry i-do-remember-my-name Huberts is working on it :-) >>> >>> I have most of it working in a basic form already but am currently >>> refactoring things to take care of some nasty little details. >>> Expect something to arrive within (my best guesstimate) about 3 to 4 >>> weeks. after next week I'll be skiing for a week, so no coding then :-) >>> >>> For the new functionality: >>> You don't really need a UI: just add a .gitignore file with a pattern >>> and the plugin will pick it up and show you what is ignored by means of >>> a nice little decoration. >> >> I expected it to work by right clicking the file and picking >> team/ignore. This would add the file name .gitignore and automatically >> add .gitignore to my commit. It would also alter the eclipse filter to >> make the file disappear in the eclipse browser. >> > > that'll come later, first we need to ignore the same files as git :-) > > which eclipse browser? I have a C/C++ perspective open right now. Navigator is on the left, editor in the middle, outline on the right. In the navigator there are several files that should be ignored. I'd like to right click on them and select team/ignore. When I do that they will be ignored in git and also disappear from my navigator. I also don't like how I have a global .git for all of my projects instead of a .git for each project individually. (Did I select that when I first installed egit and didn't know what I was doing?) Now I'm in a mess and can't publish individual projects. > > BTW. the plugin will not look at the eclipse filter for ignore files > once I've finished the implementation. that's the only way to make sure > that we ignore resources in exactly the same way as git does: git only > ignores on the basis of .gitignore files, command line options (we do > not have those for the plugin), and the info/exclude file in the repository. > -- Jon Smirl jonsmirl@gmail.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 14:08 ` Jon Smirl @ 2009-03-01 14:21 ` Tor Arne Vestbø 2009-03-01 14:31 ` Jon Smirl 0 siblings, 1 reply; 23+ messages in thread From: Tor Arne Vestbø @ 2009-03-01 14:21 UTC (permalink / raw) To: Jon Smirl; +Cc: Ferry Huberts (Pelagic), Shawn O. Pearce, Git Mailing List Jon Smirl wrote: > I have a C/C++ perspective open right now. Navigator is on the left, > editor in the middle, outline on the right. In the navigator there are > several files that should be ignored. I'd like to right click on them > and select team/ignore. When I do that they will be ignored in git and > also disappear from my navigator. That would be Team->Add to .gitignore, as Eclipse does not have a way to add files to the global ignore from context menus, but I agree, we should have something like that eventually. If we were to also remove ignored files from the views we would have to either add a View Filter for .git-ignored files, or for globally ignored files. Good idea for enhancement, please report in the issue tracker: http://code.google.com/p/egit/issues/ > I also don't like how I have a global .git for all of my projects > instead of a .git for each project individually. (Did I select that > when I first installed egit and didn't know what I was doing?) Now I'm > in a mess and can't publish individual projects. That's a result of choosing "Create repository in project's parent directory" when you shared the project in Eclipse. Perhaps we should try to detect if the project is a Java (/JDT) project, or otherwise likely to be a "child"-project, where it makes sense to have the repository in the parent directory? Tor Arne ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 14:21 ` Tor Arne Vestbø @ 2009-03-01 14:31 ` Jon Smirl 2009-03-01 14:33 ` Tor Arne Vestbø 2009-03-01 20:47 ` Robin Rosenberg 0 siblings, 2 replies; 23+ messages in thread From: Jon Smirl @ 2009-03-01 14:31 UTC (permalink / raw) To: Tor Arne Vestbø Cc: Ferry Huberts (Pelagic), Shawn O. Pearce, Git Mailing List On Sun, Mar 1, 2009 at 9:21 AM, Tor Arne Vestbø <torarnv@gmail.com> wrote: > Jon Smirl wrote: >> I have a C/C++ perspective open right now. Navigator is on the left, >> editor in the middle, outline on the right. In the navigator there are >> several files that should be ignored. I'd like to right click on them >> and select team/ignore. When I do that they will be ignored in git and >> also disappear from my navigator. > > That would be Team->Add to .gitignore, as Eclipse does not have a way to > add files to the global ignore from context menus, but I agree, we > should have something like that eventually. > > If we were to also remove ignored files from the views we would have to > either add a View Filter for .git-ignored files, or for globally ignored > files. Good idea for enhancement, please report in the issue tracker: > > http://code.google.com/p/egit/issues/ > >> I also don't like how I have a global .git for all of my projects >> instead of a .git for each project individually. (Did I select that >> when I first installed egit and didn't know what I was doing?) Now I'm >> in a mess and can't publish individual projects. > > That's a result of choosing "Create repository in project's parent > directory" when you shared the project in Eclipse. > > Perhaps we should try to detect if the project is a Java (/JDT) project, > or otherwise likely to be a "child"-project, where it makes sense to > have the repository in the parent directory? My .git got created in my workspace root. Is there ever a case where you would want .git in your workspace root? If not, remove this choice when the parent directory is the workspace root. > > Tor Arne > > -- Jon Smirl jonsmirl@gmail.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 14:31 ` Jon Smirl @ 2009-03-01 14:33 ` Tor Arne Vestbø 2009-03-01 20:47 ` Robin Rosenberg 1 sibling, 0 replies; 23+ messages in thread From: Tor Arne Vestbø @ 2009-03-01 14:33 UTC (permalink / raw) To: Jon Smirl; +Cc: Ferry Huberts (Pelagic), Shawn O. Pearce, Git Mailing List Jon Smirl wrote: > On Sun, Mar 1, 2009 at 9:21 AM, Tor Arne Vestbø <torarnv@gmail.com> wrote: >> Perhaps we should try to detect if the project is a Java (/JDT) project, >> or otherwise likely to be a "child"-project, where it makes sense to >> have the repository in the parent directory? > > My .git got created in my workspace root. Is there ever a case where > you would want .git in your workspace root? If not, remove this choice > when the parent directory is the workspace root. That would be one heuristics to figure out if the option should be enabled or disabled (or hidden) yes. Could you open an issue in the issue tracker for this? http://code.google.com/p/egit/issues/list Tor Arne ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: jgit and ignore 2009-03-01 14:31 ` Jon Smirl 2009-03-01 14:33 ` Tor Arne Vestbø @ 2009-03-01 20:47 ` Robin Rosenberg 1 sibling, 0 replies; 23+ messages in thread From: Robin Rosenberg @ 2009-03-01 20:47 UTC (permalink / raw) To: Jon Smirl Cc: Tor Arne Vestbø, Ferry Huberts (Pelagic), Shawn O. Pearce, Git Mailing List Jon Smirl writes: > My .git got created in my workspace root. Is there ever a case where > you would want .git in your workspace root? If not, remove this choice > when the parent directory is the workspace root. Sure there is. If you create your projects in the workspace, and in particular, directly beneath the workspace root, having the .git directory there is a logical choice. I generally try to create the projects outside the workspace, but Eclipse seems keen on creating projects in the workspace, but that is just my personal preferences and partly for historical reasons. -- robin ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2009-03-04 17:52 UTC | newest] Thread overview: 23+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-28 16:31 jgit and ignore Jon Smirl 2009-02-28 17:26 ` Shawn O. Pearce 2009-03-01 10:11 ` Ferry Huberts (Pelagic) 2009-03-01 12:54 ` Jon Smirl 2009-03-01 13:06 ` Ferry Huberts (Pelagic) 2009-03-01 13:34 ` Tor Arne Vestbø 2009-03-01 13:47 ` Ferry Huberts (Pelagic) 2009-03-01 14:58 ` Tor Arne Vestbø 2009-03-01 17:16 ` Shawn O. Pearce 2009-03-01 17:42 ` Tor Arne Vestbø 2009-03-01 17:49 ` Shawn O. Pearce 2009-03-01 17:51 ` Tor Arne Vestbø 2009-03-01 17:57 ` Shawn O. Pearce 2009-03-01 17:43 ` Ferry Huberts (Pelagic) 2009-03-01 17:47 ` Shawn O. Pearce 2009-03-01 20:24 ` Robin Rosenberg 2009-03-04 17:50 ` Ferry Huberts (Pelagic) 2009-03-01 17:17 ` Ferry Huberts (Pelagic) 2009-03-01 14:08 ` Jon Smirl 2009-03-01 14:21 ` Tor Arne Vestbø 2009-03-01 14:31 ` Jon Smirl 2009-03-01 14:33 ` Tor Arne Vestbø 2009-03-01 20:47 ` Robin Rosenberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).