Re: HowTo distribute a hook with the reposity.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, Peff, for your lucid answer to my question and much more. All is now clear to me.

The problem I am grappling with is how to obtain the latest git commit hash and enter it into the generated code. Configure/make would appear to the the time, but by then the user may not have git installed (e.g., extracted the project as .zip from github), so it needs to be done "back at the farm".

I hear that the best I can do is create a normal script in the repro and add to the developer handbook that "btw, here is a git hook that will run it automatically if you so choose".

Thank you both for your prompt and exhaustive answers.

	j.

On 28/12/16 08:52, Jeff King wrote:
On Wed, Dec 28, 2016 at 08:42:25AM +0000, John P. Hartmann wrote:

This project is hosted on github.  If I put the hook into the repository
manually (if I can; I don't know that), is it true that the hook would be
distributed on a clone action, but not on a pull?

I'm not sure what you mean by "into the repository". If you mean "into
the .git directory", then no, you can't do that. Git will not add ".git"
directory contents to a repository, you cannot manipulate the contents
of ".git" directories on GitHub, and a client wouldn't ever look at them
on clone or fetch anyway.

Did you mean something else?

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]