mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Error Hash Removed
This commit is contained in:
parent
5834818ebe
commit
aadf5339a4
@ -282,24 +282,12 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommitId) {
|
||||
let error = new Error(
|
||||
'Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.'
|
||||
);
|
||||
error.hash = {
|
||||
text: `cherryPick ${sourceId} ${targetId}`,
|
||||
token: `cherryPick ${sourceId} ${targetId}`,
|
||||
line: '1',
|
||||
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
||||
};
|
||||
throw error;
|
||||
}
|
||||
if (!(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))) {
|
||||
let error = new Error(
|
||||
'Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.'
|
||||
);
|
||||
error.hash = {
|
||||
text: `cherryPick ${sourceId} ${targetId}`,
|
||||
token: `cherryPick ${sourceId} ${targetId}`,
|
||||
line: '1',
|
||||
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
||||
};
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user