Re: RCS keyword expansion

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oliver Kullmann
Date: Thursday, October 11, 2007 - 8:59 am

On Thu, Oct 11, 2007 at 08:09:22AM -0700, Randal L. Schwartz wrote:

This looks like a misunderstanding of what $Date$ is used for:
It has not much to do with a version number (such things are decisions
by the developers), but it is an identification stamp, typically
used to identify exactly which piece of code is involved in a
given executable.

Our group also needs a replacement for the keyword-expansion mechanism
(we are using a nice little system, which allows for each executable produced
to query it about the source-code-files involved in it, which is especially
useful for testing and development, where many versions of many files
float around (and perhaps some shouldn't)).

The principle solution seems quite clear to me: Adapt the pre-commit hook,
so that files are scanned for the keyword, and apply the keyword expansion
then before the actual commit.

Better than just the date, it would be greatest to be able to put also
the SHA1-ID of the commit into the file, alas this is a bit complicated,
since it's a pre-commit hook; However it seems necessary to have in
the repository really the actual file content, not "modulo some modification",
due to the distributed character of Git repositories (everybody should have
the same file-timestamp), and so a post-commit hook shouldn't be used.
So well, using the previous SHA1-ID should be a reasonable approximation.

Oliver

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 7:47 am)
Re: RCS keyword expansion, Johannes Sixt, (Thu Oct 11, 8:02 am)
Re: RCS keyword expansion, Randal L. Schwartz, (Thu Oct 11, 8:09 am)
Re: RCS keyword expansion, Oliver Kullmann, (Thu Oct 11, 8:59 am)
Re: RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 10:55 am)
Re: RCS keyword expansion, Alex Riesen, (Thu Oct 11, 11:09 am)
Re: RCS keyword expansion, Lars Hjemli, (Thu Oct 11, 12:16 pm)
Re: RCS keyword expansion, Alex Riesen, (Thu Oct 11, 12:21 pm)
Re: RCS keyword expansion, Johannes Schindelin, (Thu Oct 11, 1:47 pm)
Re: RCS keyword expansion, Sam Vilain, (Thu Oct 11, 2:20 pm)
Re: RCS keyword expansion, Sam Vilain, (Thu Oct 11, 2:35 pm)
Re: RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 10:26 pm)
Re: RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 10:27 pm)
Re: RCS keyword expansion, Johannes Schindelin, (Fri Oct 12, 3:02 am)
Re: RCS keyword expansion, Peter Karlsson, (Fri Oct 12, 3:50 am)
Re: RCS keyword expansion, Johannes Sixt, (Fri Oct 12, 4:05 am)
Re: RCS keyword expansion, Lars Hjemli, (Fri Oct 12, 4:21 am)
Re: RCS keyword expansion, Johannes Schindelin, (Fri Oct 12, 4:34 am)
Re: RCS keyword expansion, Jan Hudec, (Fri Oct 12, 5:57 am)
Re: RCS keyword expansion, Salikh Zakirov, (Fri Oct 12, 12:08 pm)
Re: RCS keyword expansion, Johannes Schindelin, (Fri Oct 12, 3:42 pm)
Re: RCS keyword expansion, Zakirov Salikh, (Fri Oct 12, 4:52 pm)
Re: RCS keyword expansion, Peter Karlsson, (Mon Oct 15, 7:03 am)
Re: RCS keyword expansion, Johannes Schindelin, (Mon Oct 15, 7:28 am)