This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Commit f2919ba
reflog: change one->many worktree->refnames to use a string_list
Change the FLEX_ARRAY pattern added in bda3a31 (reflog-expire:
Avoid creating new files in a directory inside readdir(3) loop,
2008-01-25) the string-list API instead.
This does not change any behavior, allows us to delete much of this
code as it's replaced by things we get from the string-list API for
free, as a result we need just one struct to keep track of this data,
instead of two.
The "DUP" -> "string_list_append_nodup(..., strbuf_detach(...))"
pattern here is the same as that used in a recent memory leak fix in
b202e51 (grep: fix a "path_list" memory leak, 2021-10-22).
Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 46fbe41 commit f2919ba
1 file changed
+18
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
61 | 54 | | |
62 | 55 | | |
63 | 56 | | |
| |||
403 | 396 | | |
404 | 397 | | |
405 | 398 | | |
406 | | - | |
407 | | - | |
| 399 | + | |
| 400 | + | |
408 | 401 | | |
409 | 402 | | |
410 | 403 | | |
411 | 404 | | |
412 | 405 | | |
413 | 406 | | |
414 | | - | |
| 407 | + | |
415 | 408 | | |
416 | 409 | | |
417 | | - | |
418 | | - | |
419 | | - | |
| 410 | + | |
| 411 | + | |
420 | 412 | | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | 413 | | |
425 | 414 | | |
426 | 415 | | |
| |||
609 | 598 | | |
610 | 599 | | |
611 | 600 | | |
612 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
613 | 605 | | |
614 | | - | |
615 | 606 | | |
616 | | - | |
617 | 607 | | |
618 | 608 | | |
619 | 609 | | |
620 | 610 | | |
621 | | - | |
| 611 | + | |
622 | 612 | | |
623 | 613 | | |
624 | 614 | | |
625 | 615 | | |
626 | | - | |
627 | | - | |
| 616 | + | |
| 617 | + | |
628 | 618 | | |
629 | 619 | | |
630 | | - | |
631 | | - | |
| 620 | + | |
| 621 | + | |
632 | 622 | | |
633 | 623 | | |
634 | 624 | | |
635 | 625 | | |
636 | | - | |
637 | 626 | | |
638 | | - | |
| 627 | + | |
639 | 628 | | |
640 | 629 | | |
641 | 630 | | |
| |||
0 commit comments