@@ -51,15 +51,6 @@ static struct string_list option_config;
51
51
static struct string_list option_reference ;
52
52
static int option_dissociate ;
53
53
54
- static int opt_parse_reference (const struct option * opt , const char * arg , int unset )
55
- {
56
- struct string_list * option_reference = opt -> value ;
57
- if (!arg )
58
- return -1 ;
59
- string_list_append (option_reference , arg );
60
- return 0 ;
61
- }
62
-
63
54
static struct option builtin_clone_options [] = {
64
55
OPT__VERBOSITY (& option_verbosity ),
65
56
OPT_BOOL (0 , "progress" , & option_progress ,
@@ -83,8 +74,10 @@ static struct option builtin_clone_options[] = {
83
74
N_ ("initialize submodules in the clone" )),
84
75
OPT_STRING (0 , "template" , & option_template , N_ ("template-directory" ),
85
76
N_ ("directory from which templates will be used" )),
86
- OPT_CALLBACK (0 , "reference" , & option_reference , N_ ("repo" ),
87
- N_ ("reference repository" ), & opt_parse_reference ),
77
+ OPT_STRING_LIST (0 , "reference" , & option_reference , N_ ("repo" ),
78
+ N_ ("reference repository" )),
79
+ OPT_BOOL (0 , "dissociate" , & option_dissociate ,
80
+ N_ ("use --reference only while cloning" )),
88
81
OPT_STRING ('o' , "origin" , & option_origin , N_ ("name" ),
89
82
N_ ("use <name> instead of 'origin' to track upstream" )),
90
83
OPT_STRING ('b' , "branch" , & option_branch , N_ ("branch" ),
@@ -95,8 +88,6 @@ static struct option builtin_clone_options[] = {
95
88
N_ ("create a shallow clone of that depth" )),
96
89
OPT_BOOL (0 , "single-branch" , & option_single_branch ,
97
90
N_ ("clone only one branch, HEAD or --branch" )),
98
- OPT_BOOL (0 , "dissociate" , & option_dissociate ,
99
- N_ ("use --reference only while cloning" )),
100
91
OPT_STRING (0 , "separate-git-dir" , & real_git_dir , N_ ("gitdir" ),
101
92
N_ ("separate git dir from working tree" )),
102
93
OPT_STRING_LIST ('c' , "config" , & option_config , N_ ("key=value" ),
0 commit comments