File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -713,6 +713,24 @@ fn cmd_install(c: cargo) unsafe {
713713 install_uuid( c, wd, uuid) ;
714714 }
715715 }
716+ } else if str :: starts_with( target, "git: ") {
717+ let ref = if c. opts. free. len( ) >= 4 u {
718+ some( c. opts. free[ 3 u] )
719+ } else {
720+ none
721+ } ;
722+ install_git( c, wd, target, ref )
723+ } else if target == "git" {
724+ if c. opts. free. len( ) < 4 u {
725+ fail #fmt( "needed git url") ;
726+ }
727+ let url = c. opts. free[ 3 u] ;
728+ let ref = if c. opts. free. len( ) >= 5 u {
729+ some( c. opts. free[ 4 u] )
730+ } else {
731+ none
732+ } ;
733+ install_git( c, wd, url, ref )
716734 } else {
717735 let mut name = target;
718736 alt str :: find_char( name, '/' ) {
@@ -891,6 +909,8 @@ Querying:
891909Package installation:
892910 [ options] [ source/] PKGNAME Install a package by name
893911 [ options] uuid: [ source/] PKGUUID Install a package by uuid
912+ [ options] git [ url] [ ref ] Install a package by git
913+ [ options] git: //[ url] [ ref ] Install a package by git
894914
895915Package installation options:
896916 --mode=MODE Install to one of the following locations:
You can’t perform that action at this time.
0 commit comments