Commit dea007f
diff: parse separate options like -S foo
Change the option parsing logic in revision.c to accept separate forms
like `-S foo' in addition to `-Sfoo'. The rest of git already accepted
this form, but revision.c still used its own option parsing.
Short options affected are -S<string>, -l<num> and -O<orderfile>, for
which an empty string wouldn't make sense, hence -<option> <arg> isn't
ambiguous.
This patch does not handle --stat-name-width and --stat-width, which are
special-cases where diff_long_opt do not apply. They are handled in a
separate patch to ease review.
Original patch by Matthieu Moy, plus refactoring by Jonathan Nieder.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 64fdc08 commit dea007f
File tree
5 files changed
+95
-23
lines changed- t
- t4013
5 files changed
+95
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2990 | 2990 | | |
2991 | 2991 | | |
2992 | 2992 | | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
2993 | 3032 | | |
2994 | 3033 | | |
2995 | 3034 | | |
| 3035 | + | |
| 3036 | + | |
2996 | 3037 | | |
2997 | 3038 | | |
2998 | 3039 | | |
| |||
3149 | 3190 | | |
3150 | 3191 | | |
3151 | 3192 | | |
3152 | | - | |
| 3193 | + | |
3153 | 3194 | | |
3154 | 3195 | | |
3155 | | - | |
| 3196 | + | |
| 3197 | + | |
3156 | 3198 | | |
3157 | 3199 | | |
3158 | 3200 | | |
| |||
3180 | 3222 | | |
3181 | 3223 | | |
3182 | 3224 | | |
3183 | | - | |
3184 | | - | |
3185 | | - | |
3186 | | - | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
3187 | 3233 | | |
3188 | 3234 | | |
3189 | 3235 | | |
3190 | 3236 | | |
3191 | | - | |
3192 | | - | |
3193 | | - | |
3194 | | - | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
3195 | 3245 | | |
3196 | 3246 | | |
3197 | 3247 | | |
| |||
3201 | 3251 | | |
3202 | 3252 | | |
3203 | 3253 | | |
3204 | | - | |
3205 | | - | |
3206 | | - | |
3207 | | - | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
3208 | 3262 | | |
3209 | 3263 | | |
3210 | 3264 | | |
3211 | 3265 | | |
3212 | 3266 | | |
3213 | | - | |
3214 | | - | |
| 3267 | + | |
| 3268 | + | |
3215 | 3269 | | |
3216 | 3270 | | |
3217 | 3271 | | |
| 3272 | + | |
3218 | 3273 | | |
3219 | 3274 | | |
3220 | 3275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
217 | 224 | | |
218 | 225 | | |
219 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| |||
0 commit comments