mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-01-12 23:28:16 -05:00
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:
@@ -30,6 +30,7 @@ export const getStagedFiles = async (): Promise<string[]> => {
|
||||
'diff',
|
||||
'--name-only',
|
||||
'--cached',
|
||||
'--relative'
|
||||
]);
|
||||
|
||||
const filesList = files.split('\n');
|
||||
|
||||
Reference in New Issue
Block a user