git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: Integrating with hooks
Date: Wed, 14 Nov 2007 00:07:29 +0100	[thread overview]
Message-ID: <fhdane$kfs$1@ger.gmane.org> (raw)
In-Reply-To: 20071113173721.GI25282@penguin.codegnome.org

[Cc: Todd A. Jacobs <nospam@codegnome.org>, git@vger.kernel.org]

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

  reply	other threads:[~2007-11-13 23:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13 17:37 Integrating with hooks Todd A. Jacobs
2007-11-13 23:07 ` Jakub Narebski [this message]
2007-11-15  1:18   ` Todd A. Jacobs
2007-11-15  1:43     ` Jakub Narebski
2007-11-15  1:43     ` Johannes Schindelin
2007-11-15  7:57     ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fhdane$kfs$1@ger.gmane.org' \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).