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.

jan.nijtmans 2015-04-08 09:29 trunk
Commit 03921d444f2275ee497eb7335e84823fb5c08b67
1 file changed +1 -1
+1 -1
--- src/checkin.c
+++ src/checkin.c
@@ -1840,11 +1840,10 @@
18401840
" AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
18411841
){
18421842
fossil_fatal("cannot commit against a closed leaf");
18431843
}
18441844
1845
- if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1);
18461845
if( zComment ){
18471846
blob_zero(&comment);
18481847
blob_append(&comment, zComment, -1);
18491848
}else if( zComFile ){
18501849
blob_zero(&comment);
@@ -1878,10 +1877,11 @@
18781877
18791878
/* Step 1: Insert records for all modified files into the blob
18801879
** table. If there were arguments passed to this command, only
18811880
** the identified files are inserted (if they have been modified).
18821881
*/
1882
+ if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1);
18831883
db_prepare(&q,
18841884
"SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
18851885
"WHERE chnged==1 AND NOT deleted AND is_selected(id)",
18861886
g.zLocalRoot,
18871887
glob_expr("pathname", db_get("crnl-glob","")),
18881888
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button