mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-19 01:17:31 +00:00
22 lines
515 B
TypeScript
22 lines
515 B
TypeScript
import { getWin } from './main-window';
|
|
import { IPC } from './ipc-events.const';
|
|
|
|
export const getGitLog = (data) => {
|
|
const exec = require('child_process').exec;
|
|
const cmd =
|
|
"git --no-pager log --graph --pretty=format:'%s (%cr) <%an>' --abbrev-commit --since=4am";
|
|
|
|
exec(
|
|
cmd,
|
|
{
|
|
cwd: data.cwd,
|
|
},
|
|
(error, stdout) => {
|
|
const mainWin = getWin();
|
|
mainWin.webContents.send(IPC.GIT_LOG_RESPONSE, {
|
|
stdout,
|
|
requestId: data.requestId,
|
|
});
|
|
},
|
|
);
|
|
};
|