Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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

#4117

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.

Reported by Juice · March 6th, 2010 @ 02:59 PM

State: wontfix
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)
    • 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 pull without --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 obsolete branch.

    March 7th, 2010 @ 05:20 AM

  2. Juice
    Juice

    yeah, 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 1 unless you specify the --revision.

    thanks.

    March 7th, 2010 @ 06:59 AM

  3. Jeremy Kemper
    Jeremy Kemper

    This can use --revision branchname, doesn't need a new option.

    March 12th, 2010 @ 06:48 PM

  4. Juice
    Juice

    yeah, 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

    March 13th, 2010 @ 12:07 AM

  5. Jeremy Kemper
    Jeremy Kemper
    • State changed from open to wontfix

    -1 on adding more options that do the same thing. Better to improve the docs.

    March 13th, 2010 @ 02:53 AM

  6. Juice
    Juice

    do you think they are doing the same thing? can you install plugin by commit's ref rightnow?
    I think you totally misunderstood me.

    March 13th, 2010 @ 03:00 AM

  7. Jeremy Kemper
    Jeremy Kemper

    Maybe 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.)

    March 13th, 2010 @ 04:14 AM

  8. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM