Fossil SCM
Also use the now global hash_digits() function in src/info.c, and set the copy length limit to FOSSIL_HASH_DIGITS_URL for consistency with the copy buttons on the tooltips.
Commit
710229e713b81fed2134695a144db4597ed56a1d6ee142bb95b55f73fadfb964
Parent
2196555351f6233…
1 file changed
+1
-7
+1
-7
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -652,16 +652,10 @@ | ||
| 652 | 652 | ReCompiled *pRe = 0; /* regex */ |
| 653 | 653 | const char *zW; /* URL param for ignoring whitespace */ |
| 654 | 654 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 655 | 655 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 656 | 656 | |
| 657 | -/* Preprocessor definitions copied from src\printf.c. */ | |
| 658 | -#ifndef FOSSIL_HASH_DIGITS | |
| 659 | -# define FOSSIL_HASH_DIGITS 10 | |
| 660 | -#endif | |
| 661 | - int nDigitHuman = db_get_int("hash-digits", FOSSIL_HASH_DIGITS); | |
| 662 | - | |
| 663 | 657 | login_check_credentials(); |
| 664 | 658 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 665 | 659 | zName = P("name"); |
| 666 | 660 | rid = name_to_rid_www("name"); |
| 667 | 661 | if( rid==0 ){ |
| @@ -801,11 +795,11 @@ | ||
| 801 | 795 | @ </td> |
| 802 | 796 | @ </tr> |
| 803 | 797 | |
| 804 | 798 | @ <tr><th>%s(hname_alg(nUuid)):</th><td> |
| 805 | 799 | @ <span class="copy-button" id="copy-fullhash" data-copytarget="fullhash" |
| 806 | - @ data-copylength="%d(nDigitHuman)"></span> | |
| 800 | + @ data-copylength="%d(hash_digits(1))"></span> | |
| 807 | 801 | @ <span id="fullhash">%.32s(zUuid)<wbr>%s(zUuid+32)</span> |
| 808 | 802 | if( g.perm.Setup ){ |
| 809 | 803 | @ (Record ID: %d(rid)) |
| 810 | 804 | } |
| 811 | 805 | @ </td></tr> |
| 812 | 806 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -652,16 +652,10 @@ | |
| 652 | ReCompiled *pRe = 0; /* regex */ |
| 653 | const char *zW; /* URL param for ignoring whitespace */ |
| 654 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 655 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 656 | |
| 657 | /* Preprocessor definitions copied from src\printf.c. */ |
| 658 | #ifndef FOSSIL_HASH_DIGITS |
| 659 | # define FOSSIL_HASH_DIGITS 10 |
| 660 | #endif |
| 661 | int nDigitHuman = db_get_int("hash-digits", FOSSIL_HASH_DIGITS); |
| 662 | |
| 663 | login_check_credentials(); |
| 664 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 665 | zName = P("name"); |
| 666 | rid = name_to_rid_www("name"); |
| 667 | if( rid==0 ){ |
| @@ -801,11 +795,11 @@ | |
| 801 | @ </td> |
| 802 | @ </tr> |
| 803 | |
| 804 | @ <tr><th>%s(hname_alg(nUuid)):</th><td> |
| 805 | @ <span class="copy-button" id="copy-fullhash" data-copytarget="fullhash" |
| 806 | @ data-copylength="%d(nDigitHuman)"></span> |
| 807 | @ <span id="fullhash">%.32s(zUuid)<wbr>%s(zUuid+32)</span> |
| 808 | if( g.perm.Setup ){ |
| 809 | @ (Record ID: %d(rid)) |
| 810 | } |
| 811 | @ </td></tr> |
| 812 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -652,16 +652,10 @@ | |
| 652 | ReCompiled *pRe = 0; /* regex */ |
| 653 | const char *zW; /* URL param for ignoring whitespace */ |
| 654 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 655 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 656 | |
| 657 | login_check_credentials(); |
| 658 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 659 | zName = P("name"); |
| 660 | rid = name_to_rid_www("name"); |
| 661 | if( rid==0 ){ |
| @@ -801,11 +795,11 @@ | |
| 795 | @ </td> |
| 796 | @ </tr> |
| 797 | |
| 798 | @ <tr><th>%s(hname_alg(nUuid)):</th><td> |
| 799 | @ <span class="copy-button" id="copy-fullhash" data-copytarget="fullhash" |
| 800 | @ data-copylength="%d(hash_digits(1))"></span> |
| 801 | @ <span id="fullhash">%.32s(zUuid)<wbr>%s(zUuid+32)</span> |
| 802 | if( g.perm.Setup ){ |
| 803 | @ (Record ID: %d(rid)) |
| 804 | } |
| 805 | @ </td></tr> |
| 806 |