Should the script / plugin create a .git folder?

I noticed that if I do something like:

script/plugin install git://github.com/plug-xyz.git

      

It says it creates a .git folder:

Initialized empty Git repository in /Users/g/Documents/app/vendor/plugins/xyz/.git/

      

But after installing the plugin it seems that the .git folder is missing.

I ask because when I try to update the plugin nothing happens. It says it is updating, but when I check the files, they are not updated to the latest version. Then I uninstalled the plugin and installed it again and it was able to grab the most recent version.

Can't update script / plugin on git plugins?

0


a source to share


2 answers


You can see the changeset here: http://dev.rubyonrails.org/changeset/9049

It deletes the .git folder, presumably to save space without preserving history. It is traditional for version control to "install" instead of the "checkout" or "clone" command, although the hypothetical "git install" command is not used for this.



script/plugin update

looks for a directory .svn

in each plugin so it can run svn update

. Obviously, for git checkouts, the folder will not be deleted or not .git

. You have to edit this script and send them a patch to enable the git update version. This will probably be a fairly simple change.

+2


a source


Folder

.git is removed so it doesn't end up in your own SCM. For example, not everyone uses Git as their SCM (me for one) and doesn't want to check out .git repos for their own for obvious reasons.



According to the help extruded from script / plugin, the -x option will add SVN external. I found these two articles dealing with this specific issue, but haven't tried the solutions since I'm not using .git

0


a source







All Articles