Fossil SCM
Delay traversing the disk after the potential "empty check-in comment. continue (y/N)?" question: If the answer is no, we would do it unnecessary.
Commit
03921d444f2275ee497eb7335e84823fb5c08b67
Parent
93e943d56ad6a71…
1 file changed
+1
-1
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1840,11 +1840,10 @@ | ||
| 1840 | 1840 | " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch)) |
| 1841 | 1841 | ){ |
| 1842 | 1842 | fossil_fatal("cannot commit against a closed leaf"); |
| 1843 | 1843 | } |
| 1844 | 1844 | |
| 1845 | - if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1); | |
| 1846 | 1845 | if( zComment ){ |
| 1847 | 1846 | blob_zero(&comment); |
| 1848 | 1847 | blob_append(&comment, zComment, -1); |
| 1849 | 1848 | }else if( zComFile ){ |
| 1850 | 1849 | blob_zero(&comment); |
| @@ -1878,10 +1877,11 @@ | ||
| 1878 | 1877 | |
| 1879 | 1878 | /* Step 1: Insert records for all modified files into the blob |
| 1880 | 1879 | ** table. If there were arguments passed to this command, only |
| 1881 | 1880 | ** the identified files are inserted (if they have been modified). |
| 1882 | 1881 | */ |
| 1882 | + if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1); | |
| 1883 | 1883 | db_prepare(&q, |
| 1884 | 1884 | "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile " |
| 1885 | 1885 | "WHERE chnged==1 AND NOT deleted AND is_selected(id)", |
| 1886 | 1886 | g.zLocalRoot, |
| 1887 | 1887 | glob_expr("pathname", db_get("crnl-glob","")), |
| 1888 | 1888 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1840,11 +1840,10 @@ | |
| 1840 | " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch)) |
| 1841 | ){ |
| 1842 | fossil_fatal("cannot commit against a closed leaf"); |
| 1843 | } |
| 1844 | |
| 1845 | if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1); |
| 1846 | if( zComment ){ |
| 1847 | blob_zero(&comment); |
| 1848 | blob_append(&comment, zComment, -1); |
| 1849 | }else if( zComFile ){ |
| 1850 | blob_zero(&comment); |
| @@ -1878,10 +1877,11 @@ | |
| 1878 | |
| 1879 | /* Step 1: Insert records for all modified files into the blob |
| 1880 | ** table. If there were arguments passed to this command, only |
| 1881 | ** the identified files are inserted (if they have been modified). |
| 1882 | */ |
| 1883 | db_prepare(&q, |
| 1884 | "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile " |
| 1885 | "WHERE chnged==1 AND NOT deleted AND is_selected(id)", |
| 1886 | g.zLocalRoot, |
| 1887 | glob_expr("pathname", db_get("crnl-glob","")), |
| 1888 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1840,11 +1840,10 @@ | |
| 1840 | " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch)) |
| 1841 | ){ |
| 1842 | fossil_fatal("cannot commit against a closed leaf"); |
| 1843 | } |
| 1844 | |
| 1845 | if( zComment ){ |
| 1846 | blob_zero(&comment); |
| 1847 | blob_append(&comment, zComment, -1); |
| 1848 | }else if( zComFile ){ |
| 1849 | blob_zero(&comment); |
| @@ -1878,10 +1877,11 @@ | |
| 1877 | |
| 1878 | /* Step 1: Insert records for all modified files into the blob |
| 1879 | ** table. If there were arguments passed to this command, only |
| 1880 | ** the identified files are inserted (if they have been modified). |
| 1881 | */ |
| 1882 | if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1); |
| 1883 | db_prepare(&q, |
| 1884 | "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile " |
| 1885 | "WHERE chnged==1 AND NOT deleted AND is_selected(id)", |
| 1886 | g.zLocalRoot, |
| 1887 | glob_expr("pathname", db_get("crnl-glob","")), |
| 1888 |