fixed some features and added propper default direction

This commit is contained in:
Austin Fulbright
2024-07-26 23:28:07 -04:00
parent a386bd0b74
commit 887e5803d8
3 changed files with 3 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ const state = new ImperativeState<GitGraphState>(() => ({
branchConfig: new Map([[mainBranchName, { name: mainBranchName, order: mainBranchOrder }]]),
branches: new Map([[mainBranchName, null]]),
currBranch: mainBranchName,
direction: 'LR',
direction: 'TB',
seq: 0,
options: {},
}));

View File

@@ -46,6 +46,7 @@ const parseCommit = (commit: CommitAst) => {
const id = commit.id;
const message = commit.message ?? '';
const tags = commit.tags ?? undefined;
log.info(`Commit type`, commit.type);
const type = commit.type !== undefined ? commitType[commit.type] : 0;
log.info(`Commit: ${id} ${message} ${type}`);
db.commit(message, id, type, tags);

View File

@@ -57,7 +57,7 @@ Commit:
'id:' id=STRING
|'msg:'? message=STRING
|'tag:' tags+=STRING
|'type:' name=('NORMAL' | 'REVERSE' | 'HIGHLIGHT')
|'type:' type=('NORMAL' | 'REVERSE' | 'HIGHLIGHT')
)* EOL;
Branch:
'branch' name=(ID|STRING)