Closed parkr closed 10 years ago
I wonder if this would work: http://stackoverflow.com/a/3769169/213345
Given that we have access to the context
in the plugin, it could always just do git --git-dir <source>.git
. Not sure how to test it at the moment.
I thought about that, but hypothetically I should be able to run a jekyll site at any level inside a git repo, so my source (e.g. ./site
) may not contain my git dir (./.git
)
The internet tells me you can do git rev-parse --show-toplevel
to get the top level .git container dir.
I'm running a post-receive hook on my server in order to build my personal site, parkermoore.de. It runs
jekyll build
in whatever directory it cares to, and I specify the--source
and--destination
parameters in the hook. This plugin seems to break when it is executed from outside the site source, which is a problem. Is there agit
switch or something that we can use to direct git to the proper git dir?