Re: hook to get info on commit, and include that in a file that is part of the commit

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

 



On Mon, Feb 04, 2019 at 09:18:14PM -0500, Larry Martell wrote:
> On Mon, Feb 4, 2019 at 9:15 PM brian m. carlson
> <sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
> > If you want to generate a file, you can certainly do that in the
> > post-commit hook or using a Makefile target. You just can't check it
> > into the repo. Lots of projects do this as part of their build process.
> >
> > An example of what you could do is "git log --pretty='tformat:%H%n%B' HEAD".
> > That will print the commit hash and commit message to standard output
> > for each commit. If you want just one commit, you can use "-1".
> 
> Yeah, but I want it part of the repo so it makes it to the target system.

You can create an additional commit for each commit that you put in with
the additional file, or you can serialize it as a note for the commit
(using git notes), which can then be pushed to the remote server by
pushing refs/notes/commits.

I'm not aware of any other way to do what you want.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux