Skip to content

Commit

Permalink
perf: tweak up getCommits
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Dec 19, 2023
1 parent 1de7885 commit 64cac6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/js/api/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ export const getOrigin = memoizeBy(async (cwd) =>
export const getCommits = async (cwd, from, to = 'HEAD') => ctx(async ($) => {
const ref = from ? `${from}..${to}` : to

$.cwd = cwd
return (await $.raw`git log ${ref} --format=+++%s__%b__%h__%H -- .`)
return (await $.raw`git log ${ref} --format=+++%s__%b__%h__%H -- ${cwd}`)
.toString()
.split('+++')
.filter(Boolean)
Expand Down

0 comments on commit 64cac6f

Please sign in to comment.