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.

stephan 2025-07-15 08:16 git-parse-mark-fix
Commit c2d25c42f93bea3857ae1839ae69769b0fd48fab99d531c75a902ac06b10f462
1 file changed +4 -4
+4 -4
--- src/export.c
+++ src/export.c
@@ -307,20 +307,20 @@
307307
char type_;
308308
cur_tok = strtok(line, " \t");
309309
if( !cur_tok || strlen(cur_tok)<2 ){
310310
return -1;
311311
}
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. */;
316312
type_ = cur_tok[0];
317313
if( type_!='c' && type_!='b' ){
318314
/* This is probably a blob mark */
319315
mark->name = NULL;
320316
return 0;
321317
}
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. */;
322322
if( !mark->rid ){
323323
fossil_free(mark->name);
324324
fossil_trace("Non-existent SHA-1/SHA-3 in marks file: %s\n", mark->uuid);
325325
return -1;
326326
}
327327
--- 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

Keyboard Shortcuts

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