Fossil SCM
dequote_git_filename: missing return type
Commit
ee424936daca3fcaeb4e2f6db979d6dbbe9a0ae2
Parent
77cbe38af027ae7…
1 file changed
+11
-11
+11
-11
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -12,11 +12,11 @@ | ||
| 12 | 12 | ** Author contact information: |
| 13 | 13 | ** [email protected] |
| 14 | 14 | ** |
| 15 | 15 | ******************************************************************************* |
| 16 | 16 | ** |
| 17 | -** This file contains code used to import the content of a Git | |
| 17 | +** This file contains code used to import the content of a Git | |
| 18 | 18 | ** repository in the git-fast-import format as a new Fossil |
| 19 | 19 | ** repository. |
| 20 | 20 | */ |
| 21 | 21 | #include "config.h" |
| 22 | 22 | #include "import.h" |
| @@ -24,11 +24,11 @@ | ||
| 24 | 24 | |
| 25 | 25 | #if INTERFACE |
| 26 | 26 | /* |
| 27 | 27 | ** A single file change record. |
| 28 | 28 | */ |
| 29 | -struct ImportFile { | |
| 29 | +struct ImportFile { | |
| 30 | 30 | char *zName; /* Name of a file */ |
| 31 | 31 | char *zUuid; /* UUID of the file */ |
| 32 | 32 | char *zPrior; /* Prior name if the name was changed */ |
| 33 | 33 | char isFrom; /* True if obtained from the parent */ |
| 34 | 34 | char isExe; /* True if executable */ |
| @@ -80,11 +80,11 @@ | ||
| 80 | 80 | |
| 81 | 81 | /* |
| 82 | 82 | ** A no-op "xFinish" method |
| 83 | 83 | */ |
| 84 | 84 | static void finish_noop(void){} |
| 85 | - | |
| 85 | + | |
| 86 | 86 | /* |
| 87 | 87 | ** Deallocate the state information. |
| 88 | 88 | ** |
| 89 | 89 | ** The azMerge[] and aFile[] arrays are zeroed by allocated space is |
| 90 | 90 | ** retained unless the freeAll flag is set. |
| @@ -152,16 +152,16 @@ | ||
| 152 | 152 | rid = db_last_insert_rowid(); |
| 153 | 153 | } |
| 154 | 154 | if( zMark ){ |
| 155 | 155 | db_multi_exec( |
| 156 | 156 | "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)" |
| 157 | - "VALUES(%Q,%d,%B)", | |
| 157 | + "VALUES(%Q,%d,%B)", | |
| 158 | 158 | zMark, rid, &hash |
| 159 | 159 | ); |
| 160 | 160 | db_multi_exec( |
| 161 | 161 | "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)" |
| 162 | - "VALUES(%B,%d,%B)", | |
| 162 | + "VALUES(%B,%d,%B)", | |
| 163 | 163 | &hash, rid, &hash |
| 164 | 164 | ); |
| 165 | 165 | } |
| 166 | 166 | if( saveUuid ){ |
| 167 | 167 | fossil_free(gg.zPrevCheckin); |
| @@ -182,11 +182,11 @@ | ||
| 182 | 182 | blob_reset(&content); |
| 183 | 183 | import_reset(0); |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | /* |
| 187 | -** Use data accumulated in gg from a "tag" record to add a new | |
| 187 | +** Use data accumulated in gg from a "tag" record to add a new | |
| 188 | 188 | ** control artifact to the BLOB table. |
| 189 | 189 | */ |
| 190 | 190 | static void finish_tag(void){ |
| 191 | 191 | Blob record, cksum; |
| 192 | 192 | if( gg.zDate && gg.zTag && gg.zFrom && gg.zUser ){ |
| @@ -223,11 +223,11 @@ | ||
| 223 | 223 | |
| 224 | 224 | /* Forward reference */ |
| 225 | 225 | static void import_prior_files(void); |
| 226 | 226 | |
| 227 | 227 | /* |
| 228 | -** Use data accumulated in gg from a "commit" record to add a new | |
| 228 | +** Use data accumulated in gg from a "commit" record to add a new | |
| 229 | 229 | ** manifest artifact to the BLOB table. |
| 230 | 230 | */ |
| 231 | 231 | static void finish_commit(void){ |
| 232 | 232 | int i; |
| 233 | 233 | char *zFromBranch; |
| @@ -410,11 +410,11 @@ | ||
| 410 | 410 | int rid; |
| 411 | 411 | ManifestFile *pOld; |
| 412 | 412 | ImportFile *pNew; |
| 413 | 413 | if( gg.fromLoaded ) return; |
| 414 | 414 | gg.fromLoaded = 1; |
| 415 | - if( gg.zFrom==0 && gg.zPrevCheckin!=0 | |
| 415 | + if( gg.zFrom==0 && gg.zPrevCheckin!=0 | |
| 416 | 416 | && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0 |
| 417 | 417 | ){ |
| 418 | 418 | gg.zFrom = gg.zPrevCheckin; |
| 419 | 419 | gg.zPrevCheckin = 0; |
| 420 | 420 | } |
| @@ -456,11 +456,11 @@ | ||
| 456 | 456 | |
| 457 | 457 | /* |
| 458 | 458 | ** Dequote a fast-export filename. Filenames are normally unquoted. But |
| 459 | 459 | ** if the contain some obscure special characters, quotes might be added. |
| 460 | 460 | */ |
| 461 | -static dequote_git_filename(char *zName){ | |
| 461 | +static void dequote_git_filename(char *zName){ | |
| 462 | 462 | int n, i, j; |
| 463 | 463 | if( zName==0 || zName[0]!='"' ) return; |
| 464 | 464 | n = (int)strlen(zName); |
| 465 | 465 | if( zName[n-1]!='"' ) return; |
| 466 | 466 | for(i=0, j=1; j<n-1; j++){ |
| @@ -621,11 +621,11 @@ | ||
| 621 | 621 | if( pFile==0 ){ |
| 622 | 622 | pFile = import_add_file(); |
| 623 | 623 | pFile->zName = fossil_strdup(zName); |
| 624 | 624 | } |
| 625 | 625 | pFile->isExe = (fossil_strcmp(zPerm, "100755")==0); |
| 626 | - pFile->isLink = (fossil_strcmp(zPerm, "120000")==0); | |
| 626 | + pFile->isLink = (fossil_strcmp(zPerm, "120000")==0); | |
| 627 | 627 | fossil_free(pFile->zUuid); |
| 628 | 628 | pFile->zUuid = resolve_committish(zUuid); |
| 629 | 629 | pFile->isFrom = 0; |
| 630 | 630 | }else |
| 631 | 631 | if( memcmp(zLine, "D ", 2)==0 ){ |
| @@ -767,11 +767,11 @@ | ||
| 767 | 767 | |
| 768 | 768 | /* The following temp-tables are used to hold information needed for |
| 769 | 769 | ** the import. |
| 770 | 770 | ** |
| 771 | 771 | ** The XMARK table provides a mapping from fast-import "marks" and symbols |
| 772 | - ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts). | |
| 772 | + ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts). | |
| 773 | 773 | ** Given any valid fast-import symbol, the corresponding fossil rid and |
| 774 | 774 | ** uuid can found by searching against the xmark.tname field. |
| 775 | 775 | ** |
| 776 | 776 | ** The XBRANCH table maps commit marks and symbols into the branch those |
| 777 | 777 | ** commits belong to. If xbranch.tname is a fast-import symbol for a |
| 778 | 778 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -12,11 +12,11 @@ | |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** |
| 15 | ******************************************************************************* |
| 16 | ** |
| 17 | ** This file contains code used to import the content of a Git |
| 18 | ** repository in the git-fast-import format as a new Fossil |
| 19 | ** repository. |
| 20 | */ |
| 21 | #include "config.h" |
| 22 | #include "import.h" |
| @@ -24,11 +24,11 @@ | |
| 24 | |
| 25 | #if INTERFACE |
| 26 | /* |
| 27 | ** A single file change record. |
| 28 | */ |
| 29 | struct ImportFile { |
| 30 | char *zName; /* Name of a file */ |
| 31 | char *zUuid; /* UUID of the file */ |
| 32 | char *zPrior; /* Prior name if the name was changed */ |
| 33 | char isFrom; /* True if obtained from the parent */ |
| 34 | char isExe; /* True if executable */ |
| @@ -80,11 +80,11 @@ | |
| 80 | |
| 81 | /* |
| 82 | ** A no-op "xFinish" method |
| 83 | */ |
| 84 | static void finish_noop(void){} |
| 85 | |
| 86 | /* |
| 87 | ** Deallocate the state information. |
| 88 | ** |
| 89 | ** The azMerge[] and aFile[] arrays are zeroed by allocated space is |
| 90 | ** retained unless the freeAll flag is set. |
| @@ -152,16 +152,16 @@ | |
| 152 | rid = db_last_insert_rowid(); |
| 153 | } |
| 154 | if( zMark ){ |
| 155 | db_multi_exec( |
| 156 | "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)" |
| 157 | "VALUES(%Q,%d,%B)", |
| 158 | zMark, rid, &hash |
| 159 | ); |
| 160 | db_multi_exec( |
| 161 | "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)" |
| 162 | "VALUES(%B,%d,%B)", |
| 163 | &hash, rid, &hash |
| 164 | ); |
| 165 | } |
| 166 | if( saveUuid ){ |
| 167 | fossil_free(gg.zPrevCheckin); |
| @@ -182,11 +182,11 @@ | |
| 182 | blob_reset(&content); |
| 183 | import_reset(0); |
| 184 | } |
| 185 | |
| 186 | /* |
| 187 | ** Use data accumulated in gg from a "tag" record to add a new |
| 188 | ** control artifact to the BLOB table. |
| 189 | */ |
| 190 | static void finish_tag(void){ |
| 191 | Blob record, cksum; |
| 192 | if( gg.zDate && gg.zTag && gg.zFrom && gg.zUser ){ |
| @@ -223,11 +223,11 @@ | |
| 223 | |
| 224 | /* Forward reference */ |
| 225 | static void import_prior_files(void); |
| 226 | |
| 227 | /* |
| 228 | ** Use data accumulated in gg from a "commit" record to add a new |
| 229 | ** manifest artifact to the BLOB table. |
| 230 | */ |
| 231 | static void finish_commit(void){ |
| 232 | int i; |
| 233 | char *zFromBranch; |
| @@ -410,11 +410,11 @@ | |
| 410 | int rid; |
| 411 | ManifestFile *pOld; |
| 412 | ImportFile *pNew; |
| 413 | if( gg.fromLoaded ) return; |
| 414 | gg.fromLoaded = 1; |
| 415 | if( gg.zFrom==0 && gg.zPrevCheckin!=0 |
| 416 | && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0 |
| 417 | ){ |
| 418 | gg.zFrom = gg.zPrevCheckin; |
| 419 | gg.zPrevCheckin = 0; |
| 420 | } |
| @@ -456,11 +456,11 @@ | |
| 456 | |
| 457 | /* |
| 458 | ** Dequote a fast-export filename. Filenames are normally unquoted. But |
| 459 | ** if the contain some obscure special characters, quotes might be added. |
| 460 | */ |
| 461 | static dequote_git_filename(char *zName){ |
| 462 | int n, i, j; |
| 463 | if( zName==0 || zName[0]!='"' ) return; |
| 464 | n = (int)strlen(zName); |
| 465 | if( zName[n-1]!='"' ) return; |
| 466 | for(i=0, j=1; j<n-1; j++){ |
| @@ -621,11 +621,11 @@ | |
| 621 | if( pFile==0 ){ |
| 622 | pFile = import_add_file(); |
| 623 | pFile->zName = fossil_strdup(zName); |
| 624 | } |
| 625 | pFile->isExe = (fossil_strcmp(zPerm, "100755")==0); |
| 626 | pFile->isLink = (fossil_strcmp(zPerm, "120000")==0); |
| 627 | fossil_free(pFile->zUuid); |
| 628 | pFile->zUuid = resolve_committish(zUuid); |
| 629 | pFile->isFrom = 0; |
| 630 | }else |
| 631 | if( memcmp(zLine, "D ", 2)==0 ){ |
| @@ -767,11 +767,11 @@ | |
| 767 | |
| 768 | /* The following temp-tables are used to hold information needed for |
| 769 | ** the import. |
| 770 | ** |
| 771 | ** The XMARK table provides a mapping from fast-import "marks" and symbols |
| 772 | ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts). |
| 773 | ** Given any valid fast-import symbol, the corresponding fossil rid and |
| 774 | ** uuid can found by searching against the xmark.tname field. |
| 775 | ** |
| 776 | ** The XBRANCH table maps commit marks and symbols into the branch those |
| 777 | ** commits belong to. If xbranch.tname is a fast-import symbol for a |
| 778 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -12,11 +12,11 @@ | |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** |
| 15 | ******************************************************************************* |
| 16 | ** |
| 17 | ** This file contains code used to import the content of a Git |
| 18 | ** repository in the git-fast-import format as a new Fossil |
| 19 | ** repository. |
| 20 | */ |
| 21 | #include "config.h" |
| 22 | #include "import.h" |
| @@ -24,11 +24,11 @@ | |
| 24 | |
| 25 | #if INTERFACE |
| 26 | /* |
| 27 | ** A single file change record. |
| 28 | */ |
| 29 | struct ImportFile { |
| 30 | char *zName; /* Name of a file */ |
| 31 | char *zUuid; /* UUID of the file */ |
| 32 | char *zPrior; /* Prior name if the name was changed */ |
| 33 | char isFrom; /* True if obtained from the parent */ |
| 34 | char isExe; /* True if executable */ |
| @@ -80,11 +80,11 @@ | |
| 80 | |
| 81 | /* |
| 82 | ** A no-op "xFinish" method |
| 83 | */ |
| 84 | static void finish_noop(void){} |
| 85 | |
| 86 | /* |
| 87 | ** Deallocate the state information. |
| 88 | ** |
| 89 | ** The azMerge[] and aFile[] arrays are zeroed by allocated space is |
| 90 | ** retained unless the freeAll flag is set. |
| @@ -152,16 +152,16 @@ | |
| 152 | rid = db_last_insert_rowid(); |
| 153 | } |
| 154 | if( zMark ){ |
| 155 | db_multi_exec( |
| 156 | "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)" |
| 157 | "VALUES(%Q,%d,%B)", |
| 158 | zMark, rid, &hash |
| 159 | ); |
| 160 | db_multi_exec( |
| 161 | "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)" |
| 162 | "VALUES(%B,%d,%B)", |
| 163 | &hash, rid, &hash |
| 164 | ); |
| 165 | } |
| 166 | if( saveUuid ){ |
| 167 | fossil_free(gg.zPrevCheckin); |
| @@ -182,11 +182,11 @@ | |
| 182 | blob_reset(&content); |
| 183 | import_reset(0); |
| 184 | } |
| 185 | |
| 186 | /* |
| 187 | ** Use data accumulated in gg from a "tag" record to add a new |
| 188 | ** control artifact to the BLOB table. |
| 189 | */ |
| 190 | static void finish_tag(void){ |
| 191 | Blob record, cksum; |
| 192 | if( gg.zDate && gg.zTag && gg.zFrom && gg.zUser ){ |
| @@ -223,11 +223,11 @@ | |
| 223 | |
| 224 | /* Forward reference */ |
| 225 | static void import_prior_files(void); |
| 226 | |
| 227 | /* |
| 228 | ** Use data accumulated in gg from a "commit" record to add a new |
| 229 | ** manifest artifact to the BLOB table. |
| 230 | */ |
| 231 | static void finish_commit(void){ |
| 232 | int i; |
| 233 | char *zFromBranch; |
| @@ -410,11 +410,11 @@ | |
| 410 | int rid; |
| 411 | ManifestFile *pOld; |
| 412 | ImportFile *pNew; |
| 413 | if( gg.fromLoaded ) return; |
| 414 | gg.fromLoaded = 1; |
| 415 | if( gg.zFrom==0 && gg.zPrevCheckin!=0 |
| 416 | && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0 |
| 417 | ){ |
| 418 | gg.zFrom = gg.zPrevCheckin; |
| 419 | gg.zPrevCheckin = 0; |
| 420 | } |
| @@ -456,11 +456,11 @@ | |
| 456 | |
| 457 | /* |
| 458 | ** Dequote a fast-export filename. Filenames are normally unquoted. But |
| 459 | ** if the contain some obscure special characters, quotes might be added. |
| 460 | */ |
| 461 | static void dequote_git_filename(char *zName){ |
| 462 | int n, i, j; |
| 463 | if( zName==0 || zName[0]!='"' ) return; |
| 464 | n = (int)strlen(zName); |
| 465 | if( zName[n-1]!='"' ) return; |
| 466 | for(i=0, j=1; j<n-1; j++){ |
| @@ -621,11 +621,11 @@ | |
| 621 | if( pFile==0 ){ |
| 622 | pFile = import_add_file(); |
| 623 | pFile->zName = fossil_strdup(zName); |
| 624 | } |
| 625 | pFile->isExe = (fossil_strcmp(zPerm, "100755")==0); |
| 626 | pFile->isLink = (fossil_strcmp(zPerm, "120000")==0); |
| 627 | fossil_free(pFile->zUuid); |
| 628 | pFile->zUuid = resolve_committish(zUuid); |
| 629 | pFile->isFrom = 0; |
| 630 | }else |
| 631 | if( memcmp(zLine, "D ", 2)==0 ){ |
| @@ -767,11 +767,11 @@ | |
| 767 | |
| 768 | /* The following temp-tables are used to hold information needed for |
| 769 | ** the import. |
| 770 | ** |
| 771 | ** The XMARK table provides a mapping from fast-import "marks" and symbols |
| 772 | ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts). |
| 773 | ** Given any valid fast-import symbol, the corresponding fossil rid and |
| 774 | ** uuid can found by searching against the xmark.tname field. |
| 775 | ** |
| 776 | ** The XBRANCH table maps commit marks and symbols into the branch those |
| 777 | ** commits belong to. If xbranch.tname is a fast-import symbol for a |
| 778 |