Commit 02e32b7
notes: document length of fanout path with a constant
We know that a fanned-out sha1 in a notes tree cannot be
more than "aa/bb/cc/...", and we have an assert() to confirm
that. But let's factor out that length into a constant so we
can be sure it is used consistently. And even though we
assert() earlier, let's replace a strcpy with xsnprintf, so
it is clear to a reader that all cases are covered.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 7ce4fb9 commit 02e32b7
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
542 | 545 | | |
543 | 546 | | |
544 | 547 | | |
| |||
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
554 | | - | |
| 557 | + | |
555 | 558 | | |
556 | 559 | | |
557 | 560 | | |
| |||
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
565 | | - | |
| 568 | + | |
566 | 569 | | |
567 | 570 | | |
568 | 571 | | |
| |||
595 | 598 | | |
596 | 599 | | |
597 | 600 | | |
598 | | - | |
| 601 | + | |
599 | 602 | | |
600 | 603 | | |
601 | 604 | | |
| |||
0 commit comments