Commit 92ac319
teach convert_to_git a "dry run" mode
Some callers may want to know whether convert_to_git will
actually do anything before performing the conversion
itself (e.g., to decide whether to stream or handle blobs
in-core). This patch lets callers specify the dry run mode
by passing a NULL destination buffer. The return value,
instead of indicating whether conversion happened, will
indicate whether conversion would occur.
For readability, we also include a wrapper function which
makes it more obvious we are not actually performing the
conversion.
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent d0482e8 commit 92ac319
2 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
| |||
391 | 398 | | |
392 | 399 | | |
393 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
394 | 404 | | |
395 | 405 | | |
396 | 406 | | |
| |||
525 | 535 | | |
526 | 536 | | |
527 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
528 | 541 | | |
529 | 542 | | |
530 | 543 | | |
| |||
754 | 767 | | |
755 | 768 | | |
756 | 769 | | |
757 | | - | |
| 770 | + | |
758 | 771 | | |
759 | 772 | | |
760 | 773 | | |
761 | 774 | | |
762 | 775 | | |
763 | | - | |
| 776 | + | |
764 | 777 | | |
765 | 778 | | |
766 | 779 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
0 commit comments