Fossil SCM

Fix a C++-ism in the import code.

drh 2020-11-20 19:44 trunk
Commit 87c4b7c48c12a84f9d5836657b5dfe370846eef8a3805b860517543c973991c0
1 file changed +2 -1
+2 -1
--- src/import.c
+++ src/import.c
@@ -1947,15 +1947,16 @@
19471947
** The following 'fx_' table is used to hold information needed for
19481948
** importing and exporting to attribute Fossil check-ins or Git commits
19491949
** to either a desired username or full contact information string.
19501950
*/
19511951
if(ggit.nGitAttr > 0) {
1952
+ int idx;
19521953
db_unprotect(PROTECT_ALL);
19531954
db_multi_exec(
19541955
"CREATE TABLE fx_git(user TEXT, email TEXT UNIQUE);"
19551956
);
1956
- for( int idx = 0; idx < ggit.nGitAttr; ++idx ){
1957
+ for(idx = 0; idx < ggit.nGitAttr; ++idx ){
19571958
db_multi_exec(
19581959
"INSERT OR IGNORE INTO fx_git(user, email) VALUES(%Q, %Q)",
19591960
ggit.gitUserInfo[idx].zUser, ggit.gitUserInfo[idx].zEmail
19601961
);
19611962
}
19621963
--- src/import.c
+++ src/import.c
@@ -1947,15 +1947,16 @@
1947 ** The following 'fx_' table is used to hold information needed for
1948 ** importing and exporting to attribute Fossil check-ins or Git commits
1949 ** to either a desired username or full contact information string.
1950 */
1951 if(ggit.nGitAttr > 0) {
 
1952 db_unprotect(PROTECT_ALL);
1953 db_multi_exec(
1954 "CREATE TABLE fx_git(user TEXT, email TEXT UNIQUE);"
1955 );
1956 for( int idx = 0; idx < ggit.nGitAttr; ++idx ){
1957 db_multi_exec(
1958 "INSERT OR IGNORE INTO fx_git(user, email) VALUES(%Q, %Q)",
1959 ggit.gitUserInfo[idx].zUser, ggit.gitUserInfo[idx].zEmail
1960 );
1961 }
1962
--- src/import.c
+++ src/import.c
@@ -1947,15 +1947,16 @@
1947 ** The following 'fx_' table is used to hold information needed for
1948 ** importing and exporting to attribute Fossil check-ins or Git commits
1949 ** to either a desired username or full contact information string.
1950 */
1951 if(ggit.nGitAttr > 0) {
1952 int idx;
1953 db_unprotect(PROTECT_ALL);
1954 db_multi_exec(
1955 "CREATE TABLE fx_git(user TEXT, email TEXT UNIQUE);"
1956 );
1957 for(idx = 0; idx < ggit.nGitAttr; ++idx ){
1958 db_multi_exec(
1959 "INSERT OR IGNORE INTO fx_git(user, email) VALUES(%Q, %Q)",
1960 ggit.gitUserInfo[idx].zUser, ggit.gitUserInfo[idx].zEmail
1961 );
1962 }
1963

Keyboard Shortcuts

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