@@ -2099,20 +2099,20 @@ static int handle_revision_pseudo_opt(const char *submodule,
2099
2099
} else if ((argcount = parse_long_opt ("exclude" , argv , & optarg ))) {
2100
2100
add_ref_exclusion (& revs -> ref_excludes , optarg );
2101
2101
return argcount ;
2102
- } else if (starts_with (arg , "--branches=" )) {
2102
+ } else if (skip_prefix (arg , "--branches=" , & optarg )) {
2103
2103
struct all_refs_cb cb ;
2104
2104
init_all_refs_cb (& cb , revs , * flags );
2105
- for_each_glob_ref_in (handle_one_ref , arg + 11 , "refs/heads/" , & cb );
2105
+ for_each_glob_ref_in (handle_one_ref , optarg , "refs/heads/" , & cb );
2106
2106
clear_ref_exclusion (& revs -> ref_excludes );
2107
- } else if (starts_with (arg , "--tags=" )) {
2107
+ } else if (skip_prefix (arg , "--tags=" , & optarg )) {
2108
2108
struct all_refs_cb cb ;
2109
2109
init_all_refs_cb (& cb , revs , * flags );
2110
- for_each_glob_ref_in (handle_one_ref , arg + 7 , "refs/tags/" , & cb );
2110
+ for_each_glob_ref_in (handle_one_ref , optarg , "refs/tags/" , & cb );
2111
2111
clear_ref_exclusion (& revs -> ref_excludes );
2112
- } else if (starts_with (arg , "--remotes=" )) {
2112
+ } else if (skip_prefix (arg , "--remotes=" , & optarg )) {
2113
2113
struct all_refs_cb cb ;
2114
2114
init_all_refs_cb (& cb , revs , * flags );
2115
- for_each_glob_ref_in (handle_one_ref , arg + 10 , "refs/remotes/" , & cb );
2115
+ for_each_glob_ref_in (handle_one_ref , optarg , "refs/remotes/" , & cb );
2116
2116
clear_ref_exclusion (& revs -> ref_excludes );
2117
2117
} else if (!strcmp (arg , "--reflog" )) {
2118
2118
add_reflogs_to_pending (revs , * flags );
@@ -2122,14 +2122,14 @@ static int handle_revision_pseudo_opt(const char *submodule,
2122
2122
* flags ^= UNINTERESTING | BOTTOM ;
2123
2123
} else if (!strcmp (arg , "--no-walk" )) {
2124
2124
revs -> no_walk = REVISION_WALK_NO_WALK_SORTED ;
2125
- } else if (starts_with (arg , "--no-walk=" )) {
2125
+ } else if (skip_prefix (arg , "--no-walk=" , & optarg )) {
2126
2126
/*
2127
2127
* Detached form ("--no-walk X" as opposed to "--no-walk=X")
2128
2128
* not allowed, since the argument is optional.
2129
2129
*/
2130
- if (!strcmp (arg + 10 , "sorted" ))
2130
+ if (!strcmp (optarg , "sorted" ))
2131
2131
revs -> no_walk = REVISION_WALK_NO_WALK_SORTED ;
2132
- else if (!strcmp (arg + 10 , "unsorted" ))
2132
+ else if (!strcmp (optarg , "unsorted" ))
2133
2133
revs -> no_walk = REVISION_WALK_NO_WALK_UNSORTED ;
2134
2134
else
2135
2135
return error ("invalid argument to --no-walk" );
0 commit comments