Fossil SCM
Move the mark->rid assignment down one block to avoid setting it if we're not going to use it for the 'b' and 'c' mark cases.
Commit
c2d25c42f93bea3857ae1839ae69769b0fd48fab99d531c75a902ac06b10f462
Parent
076c8def287d534…
1 file changed
+4
-4
+4
-4
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -307,20 +307,20 @@ | ||
| 307 | 307 | char type_; |
| 308 | 308 | cur_tok = strtok(line, " \t"); |
| 309 | 309 | if( !cur_tok || strlen(cur_tok)<2 ){ |
| 310 | 310 | return -1; |
| 311 | 311 | } |
| 312 | - mark->rid = fast_uuid_to_rid(mark->uuid) | |
| 313 | - /* forum post bfb325108171eb8b: we want export to work | |
| 314 | - ** even if the RIDs get re-mapped, e.g. a different clone | |
| 315 | - ** is used. */; | |
| 316 | 312 | type_ = cur_tok[0]; |
| 317 | 313 | if( type_!='c' && type_!='b' ){ |
| 318 | 314 | /* This is probably a blob mark */ |
| 319 | 315 | mark->name = NULL; |
| 320 | 316 | return 0; |
| 321 | 317 | } |
| 318 | + mark->rid = fast_uuid_to_rid(mark->uuid) | |
| 319 | + /* forum post bfb325108171eb8b: we want export to work | |
| 320 | + ** even if the RIDs get re-mapped, e.g. a different clone | |
| 321 | + ** is used. */; | |
| 322 | 322 | if( !mark->rid ){ |
| 323 | 323 | fossil_free(mark->name); |
| 324 | 324 | fossil_trace("Non-existent SHA-1/SHA-3 in marks file: %s\n", mark->uuid); |
| 325 | 325 | return -1; |
| 326 | 326 | } |
| 327 | 327 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -307,20 +307,20 @@ | |
| 307 | char type_; |
| 308 | cur_tok = strtok(line, " \t"); |
| 309 | if( !cur_tok || strlen(cur_tok)<2 ){ |
| 310 | return -1; |
| 311 | } |
| 312 | mark->rid = fast_uuid_to_rid(mark->uuid) |
| 313 | /* forum post bfb325108171eb8b: we want export to work |
| 314 | ** even if the RIDs get re-mapped, e.g. a different clone |
| 315 | ** is used. */; |
| 316 | type_ = cur_tok[0]; |
| 317 | if( type_!='c' && type_!='b' ){ |
| 318 | /* This is probably a blob mark */ |
| 319 | mark->name = NULL; |
| 320 | return 0; |
| 321 | } |
| 322 | if( !mark->rid ){ |
| 323 | fossil_free(mark->name); |
| 324 | fossil_trace("Non-existent SHA-1/SHA-3 in marks file: %s\n", mark->uuid); |
| 325 | return -1; |
| 326 | } |
| 327 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -307,20 +307,20 @@ | |
| 307 | char type_; |
| 308 | cur_tok = strtok(line, " \t"); |
| 309 | if( !cur_tok || strlen(cur_tok)<2 ){ |
| 310 | return -1; |
| 311 | } |
| 312 | type_ = cur_tok[0]; |
| 313 | if( type_!='c' && type_!='b' ){ |
| 314 | /* This is probably a blob mark */ |
| 315 | mark->name = NULL; |
| 316 | return 0; |
| 317 | } |
| 318 | mark->rid = fast_uuid_to_rid(mark->uuid) |
| 319 | /* forum post bfb325108171eb8b: we want export to work |
| 320 | ** even if the RIDs get re-mapped, e.g. a different clone |
| 321 | ** is used. */; |
| 322 | if( !mark->rid ){ |
| 323 | fossil_free(mark->name); |
| 324 | fossil_trace("Non-existent SHA-1/SHA-3 in marks file: %s\n", mark->uuid); |
| 325 | return -1; |
| 326 | } |
| 327 |