Closed sudodoki closed 9 years ago
can you provide more details, like: cd server ; git commit
+1. This should be a simple feature to add. Would you be open to a PR for this?
Sure we like pull requests! :)
I think I'm still unclear on what is actually needed here? Could you please elaborate a bit?
We should be able to run pre-commit from a subdirectory of the repository root. Right now, if you run it in a subdirectory, it doesn't search upwards for a folder containing a .git
directory, it just complains that there is no .git
folder.
Oh, so you mean given the following structure:
repo
├── .git
├── lib
│ └── foo.rb
└── test
└── foo_test.rb
You should be able to do the following:
$ cd lib
$ git commit
?
That's it exactly! PR here: https://github.com/jish/pre-commit/pull/221
In my use case I have multiple folders in single repo & pre-commit doesn't traverse parent folders to find .git. To illutstrate, folder structure is something like this