fix(git.ts): add relative flag to git diff command (#37)

The relative flag has been added to the git diff command in the
getStagedFiles function. This flag makes the output of the command
relative to the current working directory, which makes it easier to work
with the file paths and enables executing opencommit from anywhere in
the repository, not just from the root.
This commit is contained in:
Moret84
2023-03-21 08:08:46 +01:00
committed by GitHub
parent 2acf833cd0
commit 0f48cc616e

View File

@@ -30,6 +30,7 @@ export const getStagedFiles = async (): Promise<string[]> => {
'diff',
'--name-only',
'--cached',
'--relative'
]);
const filesList = files.split('\n');