Commit 9221ca2
committed
config: format expiry dates gently
Move the logic for formatting expiry date config values into a helper
method and use gentle parsing when needed.
There is an unfortunate asymmetry in these two parsing methods, but we
need to treat a positive response from parse_expiry_date() as an error
or we will get incorrect values.
This updates the behavior of 'git config list --type=expiry-date' to be
quiet when attempting parsing on non-date values.
Signed-off-by: Derrick Stolee <stolee@gmail.com>1 parent d1cfa0c commit 9221ca2
2 files changed
+22
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
339 | 357 | | |
340 | 358 | | |
341 | 359 | | |
| |||
371 | 389 | | |
372 | 390 | | |
373 | 391 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
380 | 395 | | |
381 | 396 | | |
382 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2536 | 2536 | | |
2537 | 2537 | | |
2538 | 2538 | | |
2539 | | - | |
2540 | | - | |
2541 | | - | |
2542 | | - | |
2543 | | - | |
2544 | | - | |
2545 | | - | |
2546 | 2539 | | |
2547 | 2540 | | |
2548 | 2541 | | |
2549 | 2542 | | |
2550 | 2543 | | |
2551 | 2544 | | |
2552 | 2545 | | |
2553 | | - | |
| 2546 | + | |
2554 | 2547 | | |
2555 | 2548 | | |
2556 | 2549 | | |
| |||
0 commit comments