Fossil SCM
Fix the "branch new" command so that it works if the parent omits the R-card. Ticket [3bfff6e03bcc5f14]
Commit
448dc5adf75e5ea88b2fcf7eece5f443ddd9c784
Parent
18575b14ac0974b…
1 file changed
+3
-1
+3
-1
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -99,11 +99,13 @@ | ||
| 99 | 99 | } |
| 100 | 100 | blob_append(&branch, "\n", 1); |
| 101 | 101 | } |
| 102 | 102 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rootid); |
| 103 | 103 | blob_appendf(&branch, "P %s\n", zUuid); |
| 104 | - blob_appendf(&branch, "R %s\n", pParent->zRepoCksum); | |
| 104 | + if( pParent->zRepoCksum ){ | |
| 105 | + blob_appendf(&branch, "R %s\n", pParent->zRepoCksum); | |
| 106 | + } | |
| 105 | 107 | manifest_destroy(pParent); |
| 106 | 108 | |
| 107 | 109 | /* Add the symbolic branch name and the "branch" tag to identify |
| 108 | 110 | ** this as a new branch */ |
| 109 | 111 | if( zColor!=0 ){ |
| 110 | 112 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -99,11 +99,13 @@ | |
| 99 | } |
| 100 | blob_append(&branch, "\n", 1); |
| 101 | } |
| 102 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rootid); |
| 103 | blob_appendf(&branch, "P %s\n", zUuid); |
| 104 | blob_appendf(&branch, "R %s\n", pParent->zRepoCksum); |
| 105 | manifest_destroy(pParent); |
| 106 | |
| 107 | /* Add the symbolic branch name and the "branch" tag to identify |
| 108 | ** this as a new branch */ |
| 109 | if( zColor!=0 ){ |
| 110 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -99,11 +99,13 @@ | |
| 99 | } |
| 100 | blob_append(&branch, "\n", 1); |
| 101 | } |
| 102 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rootid); |
| 103 | blob_appendf(&branch, "P %s\n", zUuid); |
| 104 | if( pParent->zRepoCksum ){ |
| 105 | blob_appendf(&branch, "R %s\n", pParent->zRepoCksum); |
| 106 | } |
| 107 | manifest_destroy(pParent); |
| 108 | |
| 109 | /* Add the symbolic branch name and the "branch" tag to identify |
| 110 | ** this as a new branch */ |
| 111 | if( zColor!=0 ){ |
| 112 |