This project is archived and is in readonly mode.

[PATCH] Install Plugin: pass -b/--branch BRANCH for git plugins and -r/--revision REVISION for git/subversion plugins
Reported by Juice | March 6th, 2010 @ 02:59 PM | in 3.0.2
we can pass -b/--branch BRANCH for git plugins and -r/--revision REVISION for git/subversion plugins.
for example:
rails plugin install --branch rails3 git://github.com:jinzhu/acts_as_rateable.git 
will run:
git init
git pull git://github.com:jinzhu/acts_as_rateable.git rails3
remove .git .gitignore
rails plugin install --revision d71ae3a72b04579fdc270ccabcd31ad17fc22148 --branch rails3 git://github.com:jinzhu/acts_as_rateable.git 
will run:
git init
git pull git://github.com:jinzhu/acts_as_rateable.git rails3 && git reset --hard d71ae3a72b04579fdc270ccabcd31ad17fc22148
remove .git .gitignore
rails plugin install --revision d71ae3a72b04579fdc270ccabcd31ad17fc22148 git://github.com:jinzhu/acts_as_rateable.git 
will run:
git init
git pull git://github.com:jinzhu/acts_as_rateable.git && git reset --hard d71ae3a72b04579fdc270ccabcd31ad17fc22148
remove .git .gitignore
other things havn't changed.
thanks.
Comments and changes to this ticket
- 
         Prem Sichanugrist (sikachu) March 7th, 2010 @ 05:20 AM- State changed from new to open
- Assigned user set to José Valim
- Milestone cleared.
 I only see the patch for Git, is that correct? I somewhat think this is a good idea, but then will it be much slower using git pullwithout--depth?Anyway, if the speed is not the problem, then I think this would help so that people wouldn't have to specify specific ref on that brach, for instance if they want to install the obsoletebranch.
- 
            
         Juice March 7th, 2010 @ 06:59 AMyeah, I only add the patch for git. as I test,I don't think it will be much slower. ;) there is another version, in this version, it's will keep the --depth 1unless you specify the--revision.thanks. 
- 
         Jeremy Kemper March 12th, 2010 @ 06:48 PMThis can use --revision branchname, doesn't need a new option.
- 
            
         Juice March 13th, 2010 @ 12:07 AMyeah, I know that, there is no document.and not easy to understand. this patch provide more options, you can install a plugin by branchname and commit ref 
- 
         Jeremy Kemper March 13th, 2010 @ 02:53 AM- State changed from open to wontfix
 -1 on adding more options that do the same thing. Better to improve the docs. 
- 
            
         Juice March 13th, 2010 @ 03:00 AMdo you think they are doing the same thing? can you install plugin by commit's refrightnow?
 I think you totally misunderstood me.
- 
         Jeremy Kemper March 13th, 2010 @ 04:14 AMMaybe I totally misunderstand: you added support for installing a specific revision, then you added support for --branch. In git, these are both refs. You're installing a plugin at a specific ref, whether it's a revhash or a branch or a tag. So we only need one option. Ideally, this would be an argument instead of a special option, and it would default to "master" (Keeping the same options as svn is not necessary, either.) 
- 
         Jeremy Kemper October 15th, 2010 @ 11:01 PM- Milestone set to 3.0.2
- Importance changed from  to Low
 
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 
         4719 
          plugin action does not conform to script/rails plugin install 
        Rails::Generators::Actions#plugin
(railties/lib/rails/gen... 4719 
          plugin action does not conform to script/rails plugin install 
        Rails::Generators::Actions#plugin
(railties/lib/rails/gen...
 Jeremy Kemper
      Jeremy Kemper
 José Valim
      José Valim
 Juice
      Juice
 Prem Sichanugrist (sikachu)
      Prem Sichanugrist (sikachu)