fix checkout if branch already exist
This commit is contained in:
parent
781b239d0d
commit
7bd9286a9b
|
@ -135,6 +135,10 @@ export const merge = function (otherBranch) {
|
|||
|
||||
export const checkout = function (branch) {
|
||||
log.debug('in checkout');
|
||||
if (!branches[branch]) {
|
||||
branches[branch] = head != null ? head.id : null;
|
||||
log.debug('in createBranch');
|
||||
}
|
||||
curBranch = branch;
|
||||
const id = branches[curBranch];
|
||||
head = commits[id];
|
||||
|
|
Loading…
Reference in New Issue