chiptopher/guet

guet cannot find git repo if not called from project root

Closed this issue · 0 comments

Bug report

In a situation where a guet hook is called in a way that the current working directory isn't the root of the project, it will fail to add the Co-Authored by messages to the commit.

Actual behavior?

Co-Authored by is not being added when the script is ran outside of the root directory.

Expected behavior?

guet should be able to walk up the directory graph until until it finds the .git folder. For example:

project/
   .git/
   ui/
      --> running guet here

Running guet from the ui folder should still be able to find the .git folder.