a3fade4d42
The function getStagedFiles has been refactored to use git rev-parse to get the root directory of the repository. This improves the reliability of the function as it will work regardless of the current working directory. The root directory is then passed to the git diff command to get the list of staged files. With only the --relative flag, staged diff(s) on files in a different same level directory as the current working one would not be found by the command.