Fossil SCM

Statement ordering: Don't read 'fingerprint' when there are no checkin's.

jan.nijtmans 2019-10-07 11:03 trunk
Commit ffe7cc595e4c1835f2e55abf4aa09ba81667bcbb0e5a698f19e7a5f92d6f8333
1 file changed +1 -1
+1 -1
--- src/db.c
+++ src/db.c
@@ -4027,15 +4027,15 @@
40274027
int db_fingerprint_ok(void){
40284028
char *zCkout; /* The fingerprint recorded in the checkout database */
40294029
char *zRepo; /* The fingerprint of the repository */
40304030
int rc; /* Result */
40314031
4032
- zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'");
40334032
if( !db_lget_int("checkout", 0) ){
40344033
/* We have an empty checkout, fingerprint is still NULL. */
40354034
return 2;
40364035
}
4036
+ zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'");
40374037
if( zCkout==0 ){
40384038
/* This is an older checkout that does not record a fingerprint.
40394039
** We have to assume everything is ok */
40404040
return 2;
40414041
}
40424042
--- src/db.c
+++ src/db.c
@@ -4027,15 +4027,15 @@
4027 int db_fingerprint_ok(void){
4028 char *zCkout; /* The fingerprint recorded in the checkout database */
4029 char *zRepo; /* The fingerprint of the repository */
4030 int rc; /* Result */
4031
4032 zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'");
4033 if( !db_lget_int("checkout", 0) ){
4034 /* We have an empty checkout, fingerprint is still NULL. */
4035 return 2;
4036 }
 
4037 if( zCkout==0 ){
4038 /* This is an older checkout that does not record a fingerprint.
4039 ** We have to assume everything is ok */
4040 return 2;
4041 }
4042
--- src/db.c
+++ src/db.c
@@ -4027,15 +4027,15 @@
4027 int db_fingerprint_ok(void){
4028 char *zCkout; /* The fingerprint recorded in the checkout database */
4029 char *zRepo; /* The fingerprint of the repository */
4030 int rc; /* Result */
4031
 
4032 if( !db_lget_int("checkout", 0) ){
4033 /* We have an empty checkout, fingerprint is still NULL. */
4034 return 2;
4035 }
4036 zCkout = db_text(0,"SELECT value FROM localdb.vvar WHERE name='fingerprint'");
4037 if( zCkout==0 ){
4038 /* This is an older checkout that does not record a fingerprint.
4039 ** We have to assume everything is ok */
4040 return 2;
4041 }
4042

Keyboard Shortcuts

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