mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 05:49:43 +02:00
fix checkout if branch already exist
This commit is contained in:
@@ -135,6 +135,10 @@ export const merge = function (otherBranch) {
|
|||||||
|
|
||||||
export const checkout = function (branch) {
|
export const checkout = function (branch) {
|
||||||
log.debug('in checkout');
|
log.debug('in checkout');
|
||||||
|
if (!branches[branch]) {
|
||||||
|
branches[branch] = head != null ? head.id : null;
|
||||||
|
log.debug('in createBranch');
|
||||||
|
}
|
||||||
curBranch = branch;
|
curBranch = branch;
|
||||||
const id = branches[curBranch];
|
const id = branches[curBranch];
|
||||||
head = commits[id];
|
head = commits[id];
|
||||||
|
Reference in New Issue
Block a user