Fossil SCM

Improved handling of tag names in "import --git".

drh 2015-03-16 19:45 trunk merge
Commit 3270562fe0b7aff565ed5d75d95cbe1ca48ffa10
1 file changed +2 -2
+2 -2
--- src/import.c
+++ src/import.c
@@ -516,12 +516,12 @@
516516
** last commit that holds that tag.
517517
**
518518
** None of the above is explained in the git-fast-export
519519
** documentation. We had to figure it out via trial and error.
520520
*/
521
- for(i=strlen(z)-1; i>=0 && z[i]!='/'; i--){}
522
- gg.tagCommit = strncmp(&z[i-4], "tags", 4)==0; /* True for pattern B */
521
+ for(i=5; i<strlen(z) && z[i]!='/'; i++){}
522
+ gg.tagCommit = strncmp(&z[5], "tags", 4)==0; /* True for pattern B */
523523
if( z[i+1]!=0 ) z += i+1;
524524
if( fossil_strcmp(z, "master")==0 ) z = "trunk";
525525
gg.zBranch = fossil_strdup(z);
526526
gg.fromLoaded = 0;
527527
}else
528528
--- src/import.c
+++ src/import.c
@@ -516,12 +516,12 @@
516 ** last commit that holds that tag.
517 **
518 ** None of the above is explained in the git-fast-export
519 ** documentation. We had to figure it out via trial and error.
520 */
521 for(i=strlen(z)-1; i>=0 && z[i]!='/'; i--){}
522 gg.tagCommit = strncmp(&z[i-4], "tags", 4)==0; /* True for pattern B */
523 if( z[i+1]!=0 ) z += i+1;
524 if( fossil_strcmp(z, "master")==0 ) z = "trunk";
525 gg.zBranch = fossil_strdup(z);
526 gg.fromLoaded = 0;
527 }else
528
--- src/import.c
+++ src/import.c
@@ -516,12 +516,12 @@
516 ** last commit that holds that tag.
517 **
518 ** None of the above is explained in the git-fast-export
519 ** documentation. We had to figure it out via trial and error.
520 */
521 for(i=5; i<strlen(z) && z[i]!='/'; i++){}
522 gg.tagCommit = strncmp(&z[5], "tags", 4)==0; /* True for pattern B */
523 if( z[i+1]!=0 ) z += i+1;
524 if( fossil_strcmp(z, "master")==0 ) z = "trunk";
525 gg.zBranch = fossil_strdup(z);
526 gg.fromLoaded = 0;
527 }else
528

Keyboard Shortcuts

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