After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 566698 - Git: add a method to create a new git repository
Git: add a method to create a new git repository
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: git
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: James Liggett
James Liggett
Depends on:
Blocks:
 
 
Reported: 2009-01-05 23:21 UTC by Philip Van Hoof
Modified: 2009-07-30 08:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Van Hoof 2009-01-05 23:21:54 UTC
See summary

My project is a checkout from subversion, not a git project. Yet the git menus are visible.
Comment 1 James Liggett 2009-01-11 01:24:56 UTC
Is the git plugin loaded?
Comment 2 Philip Van Hoof 2009-01-11 13:17:29 UTC
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.
Comment 3 James Liggett 2009-01-12 03:23:48 UTC
(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?
Comment 4 Tobias Mueller 2009-06-26 20:41:57 UTC
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 5 Philip Van Hoof 2009-06-27 09:19:50 UTC
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).
Comment 6 Johannes Schmid 2009-06-27 17:10:29 UTC
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!
Comment 7 James Liggett 2009-06-29 00:34:10 UTC
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?
Comment 8 Johannes Schmid 2009-06-29 06:35:53 UTC
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.
Comment 9 James Liggett 2009-07-06 00:39:37 UTC
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. 
Comment 10 James Liggett 2009-07-30 08:57:37 UTC
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.