Re: Integrating with hooks

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

 



[Cc: Todd A. Jacobs <nospam@xxxxxxxxxxxxx>, git@xxxxxxxxxxxxxxx]

Todd A. Jacobs wrote:

> I've created some bash functions which handle tagging some files with
> revision information, but even after reading the git manual I'm not
> really sure how to integrate them so that they remove revision expansion
> before each check-in (to avoid cluttering the repository with keyword
> substitutions), and add them back (with the current commit info) after
> each commit.
> 
> These are the functions:

[...]

> How do I hook this in the way I want so that it's handled automatically?

Take a look at gitattributes(5), namely 'filter' attribute.

Although instead of implementing it "by hand", perhaps it would be
enough to use 'ident' and/or 'export-subs' attribute.

P.S. Because of the way git updates files, and git thinks about files
it is I think universally regarded to be bad idea to put in a file
any Id that depend on commit data.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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