File tree 1 file changed +20
-0
lines changed
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 {
713
713
install_uuid( c, wd, uuid) ;
714
714
}
715
715
}
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 )
716
734
} else {
717
735
let mut name = target;
718
736
alt str :: find_char( name, '/' ) {
@@ -891,6 +909,8 @@ Querying:
891
909
Package installation:
892
910
[ options] [ source/] PKGNAME Install a package by name
893
911
[ 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
894
914
895
915
Package installation options:
896
916
--mode=MODE Install to one of the following locations:
You can’t perform that action at this time.
0 commit comments