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 1
1
use crate :: command_prelude:: * ;
2
2
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." ;
6
4
7
5
pub fn cli ( ) -> App {
8
6
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 )
23
10
}
24
11
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 ( ) )
37
14
}
Original file line number Diff line number Diff line change @@ -129,12 +129,6 @@ _cargo() {
129
129
_arguments -s -S $common $manifest
130
130
;;
131
131
132
- git-checkout)
133
- _arguments -s -S $common \
134
- '--reference=:reference' \
135
- '--url=:url:_urls'
136
- ;;
137
-
138
132
help)
139
133
_cargo_cmds
140
134
;;
Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ _cargo()
56
56
local opt__fetch=" $opt_common $opt_mani $opt_lock --target"
57
57
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"
58
58
local opt__generate_lockfile=" $opt_common $opt_mani $opt_lock "
59
- local opt__git_checkout=" $opt_common $opt_lock --reference --url"
60
59
local opt__help=" $opt_help "
61
60
local opt__init=" $opt_common $opt_lock --bin --lib --name --vcs --edition --registry"
62
61
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