Skip to content

Commit

Permalink
fix(git): add dashes after git log <rev> (#7144)
Browse files Browse the repository at this point in the history
To fix an ambiguous argument error from git, following this notation:

    git <command> [<revision>...] -- [<file>...]
  • Loading branch information
twz123 committed Aug 31, 2020
1 parent 2b6abfc commit b7f215b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/util/git/index.ts
Expand Up @@ -397,7 +397,13 @@ export async function isBranchModified(branchName: string): Promise<boolean> {
}
// Retrieve the author of the most recent commit
const lastAuthor = (
await git.raw(['log', '-1', '--pretty=format:%ae', `origin/${branchName}`])
await git.raw([
'log',
'-1',
'--pretty=format:%ae',
`origin/${branchName}`,
'--',
])
).trim();
const { gitAuthorEmail } = config;
if (
Expand Down

0 comments on commit b7f215b

Please sign in to comment.