GNOME Bugzilla – Bug 566698
Git: add a method to create a new git repository
Last modified: 2009-07-30 08:57:37 UTC
See summary My project is a checkout from subversion, not a git project. Yet the git menus are visible.
Is the git plugin loaded?
Yes, but the project's structure ain't git. Whether the plugin is loaded or not shouldn't matter, as its support, without the project being a git repo, is useless. Unless, maybe, for the one feature of converting the project's directory into a git repository.
(In reply to comment #2) > Yes, but the project's structure ain't git. Whether the plugin is loaded or not > shouldn't matter, as its support, without the project being a git repo, is > useless. While that might be true, all VCS plugins behave this way. We have some rudimentary structure checking (usually just checking for .git, .svn, or whatever folder) that only serves to disable the FM context menu in these plugins. But, I'm not really convinced that we absolutely have to hide the menu even if that plugin can't be used with a particular project because it's not using that VCS system. Personally, I would still like to have some kind of visual feedback that a certain plugin loaded properly and works, its usefulness in a particular project notwithstanding. In short, I kind of expect to see things like the menu and other UI elements to give me this reassurance, otherwise I might think something has gone wrong. So, I wonder, why is the plugin loaded if you're not working with a git project? Did it load on its own somehow, or did you load it explicitly?
Hey Philip :) can you answer the questions in comment #3? Maybe it's better to have this discussed on some anjuta related mailinglist to have an official argument to decide whether this is a WONTFIX.
Comment #3: No idea, maybe I selected it. Nonetheless I think it should at least somehow let me know that it didn't detect a git structure in my directory, and give me advise on how I can get it (initialize it, clone an existing, etc).
OK, if I understand you correctly the git plugin should disable all it's menu entries if this is now git project and provide a way to create a new git repository. Changing summary!
Johannes: I'm not quite sure that disabling the Git menu is such a great idea. I also think that a popup in the event that there's no git structure is a little too obtrusive for my taste. But, it is certainly reasonable to add a frontend to git init. One possible way of doing this is adding an option to the project import dialog to create a git repo when it imports. This would of course be mutually exclusive with clone, that would be used if a user imports from a local folder and not a remote VCS. Aside from that, let's say I did add an init option to the Git menu somewhere. How would I get to it if the Git menu is automatically disabled?
I didn't talk about disabling the whole menu (the HIG doesn't even allow it). I said, disable menu entries on context. For examples, if the project doesn't have a git repository yet, all entries other than "init" should be disabled, if a file is already part of the project, "add" should be disabled, etc. I also don't like the popup idea.
The revised summary suggests that this should actually be two different bugs. I'm changing the summary of this one for implementing the init command, and a clone of this bug has been made, bug 587847, for disabling commands based on context.
I have added an option to the git plugin to initialize new repositories. Discussion of disabling menu items based on context should take place on bug 587847.