File tree Expand file tree Collapse file tree 3 files changed +6
-36
lines changed Expand file tree Collapse file tree 3 files changed +6
-36
lines changed Original file line number Diff line number Diff line change 11use crate :: command_prelude:: * ;
22
3- use cargo:: core:: { GitReference , Source , SourceId } ;
4- use cargo:: sources:: GitSource ;
5- use cargo:: util:: IntoUrl ;
3+ const REMOVED : & str = "The `git-checkout` subcommand has been removed." ;
64
75pub fn cli ( ) -> App {
86 subcommand ( "git-checkout" )
9- . about ( "Checkout a copy of a Git repository" )
10- . arg ( opt ( "quiet" , "No output printed to stdout" ) . short ( "q" ) )
11- . arg (
12- Arg :: with_name ( "url" )
13- . long ( "url" )
14- . value_name ( "URL" )
15- . required ( true ) ,
16- )
17- . arg (
18- Arg :: with_name ( "reference" )
19- . long ( "reference" )
20- . value_name ( "REF" )
21- . required ( true ) ,
22- )
7+ . about ( "This subcommand has been removed" )
8+ . settings ( & [ AppSettings :: Hidden ] )
9+ . help ( REMOVED )
2310}
2411
25- pub fn exec ( config : & mut Config , args : & ArgMatches < ' _ > ) -> CliResult {
26- let url = args. value_of ( "url" ) . unwrap ( ) . into_url ( ) ?;
27- let reference = args. value_of ( "reference" ) . unwrap ( ) ;
28-
29- let reference = GitReference :: Branch ( reference. to_string ( ) ) ;
30- let source_id = SourceId :: for_git ( & url, reference) ?;
31-
32- let mut source = GitSource :: new ( source_id, config) ?;
33-
34- source. update ( ) ?;
35-
36- Ok ( ( ) )
12+ pub fn exec ( _config : & mut Config , _args : & ArgMatches < ' _ > ) -> CliResult {
13+ Err ( anyhow:: format_err!( REMOVED ) . into ( ) )
3714}
Original file line number Diff line number Diff line change @@ -129,12 +129,6 @@ _cargo() {
129129 _arguments -s -S $common $manifest
130130 ;;
131131
132- git-checkout)
133- _arguments -s -S $common \
134- '--reference=:reference' \
135- '--url=:url:_urls'
136- ;;
137-
138132 help)
139133 _cargo_cmds
140134 ;;
Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ _cargo()
5656 local opt__fetch=" $opt_common $opt_mani $opt_lock --target"
5757 local opt__fix=" $opt_common $opt_pkg_spec $opt_feat $opt_mani $opt_jobs $opt_targets $opt_lock --release --target --message-format --broken-code --edition --edition-idioms --allow-no-vcs --allow-dirty --allow-staged --profile --target-dir"
5858 local opt__generate_lockfile=" $opt_common $opt_mani $opt_lock "
59- local opt__git_checkout=" $opt_common $opt_lock --reference --url"
6059 local opt__help=" $opt_help "
6160 local opt__init=" $opt_common $opt_lock --bin --lib --name --vcs --edition --registry"
6261 local opt__install=" $opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --bins --branch --debug --example --examples --git --list --path --rev --root --tag --version --registry --target --profile --no-track"
You can’t perform that action at this time.
0 commit comments