From: "René Scharfe" <rene.scharfe@lsrfire•ath.cx>
To: Junio C Hamano <junkio@cox•net>
Cc: "Shawn O. Pearce" <spearce@spearce•org>,
git@vger•kernel.org, Frank Lichtenheld <frank@lichtenheld•de>,
Johan Herland <johan@herland•net>,
Thomas Glanzmann <thomas@glanzmann•de>,
Michael Gernoth <simigern@cip•informatik.uni-erlangen.de>,
Linus Torvalds <torvalds@linux-foundation•org>
Subject: Re: Commit ID in exported Tar Ball
Date: Wed, 23 May 2007 01:44:37 +0200 [thread overview]
Message-ID: <46538065.9080705@lsrfire.ath.cx> (raw)
In-Reply-To: <7vd50s79lg.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano schrieb:
> René Scharfe <rene.scharfe@lsrfire•ath.cx> writes:
>
>> OK, so here's a first shot at the mentioned parser. It only understands
>> @@COMMITID@@ and @@@@, but it's easily extendible. The internals of
>> git-describe would need to be converted to library functions, preferably
>> offering every piece of version info separately (see thread "[PATCH]
>> Make sure an autogenerated version has at least four parts" for why).
>>
>> Before doing that, we should determine if this is the way to, though.
>>
>> René
>
> Hmmm. I am torn.
>
> It almost feels as if we'd better bite the bullet and do more
> insane things in ident substitution, instead of introducing this
> apparent syntax inconsistency between "$id$" and "@@COMMITID@@".
$Id$ (and $commit$) is reversible, @@COMMITID@@ is not. That means you
can create a synthetic file byte for byte with @@COMMITID@@ (and its not
yet implemented brethren), but you can't do that with $Id$ -- it's
impossible to get rid of the dollar signs.
I'm not attached to any particular syntax. It all started with
@@VERSION@@ from git.spec.in, which should not be implemented 1:1 anyway
(we'd need to be able to use arbitrary separators between version parts
to support different ways of ordering version numbers).
We could use $ to indicate reversible substitutions as before and @
(instead of @@) for one-way substitutions. I can't think of any other
use than in archives, though. It sure would be very confusing to have
such a conversion happen on checkout -- you'd need to use git-cat-file
to see the real file contents.
> That is, we could (I am not seriously proposing to do this, as I
> expect this will lead to a lot of insanity at the end):
>
> (1) introduce "const unsigned char commit_in_focus[20]",
> globally available to git suite, and clear it at the
> beginning of main();
Ugh. Requiring another global variable doesn't smell like good design.
By the way, we already have a similar, but very different syntax: the
one format_commit_message in commit.c. It's a one-way conversion, too.
Maybe we should copy the relevant pieces like %H and %h from there..
Do we want git-archive specific one-way conversions that are capable of
creating files like git.spec? Or is this just a shiny toy hypnotizing
me? 8-)
René
next prev parent reply other threads:[~2007-05-22 23:45 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 16:38 Commit ID in exported Tar Ball Thomas Glanzmann
2007-05-17 16:57 ` Johan Herland
2007-05-17 17:11 ` Frank Lichtenheld
2007-05-17 17:14 ` Thomas Glanzmann
2007-05-17 17:28 ` Johan Herland
2007-05-18 22:09 ` [PATCH] git-archive: convert archive entries like checkouts do René Scharfe
2007-05-18 22:27 ` Daniel Barkalow
2007-05-18 22:58 ` René Scharfe
2007-05-19 20:22 ` Commit ID in exported Tar Ball René Scharfe
2007-05-19 21:00 ` Junio C Hamano
2007-05-19 21:39 ` A Large Angry SCM
2007-05-20 0:15 ` René Scharfe
2007-05-20 11:20 ` René Scharfe
2007-05-20 3:57 ` Shawn O. Pearce
2007-05-20 11:20 ` René Scharfe
2007-05-21 6:02 ` Shawn O. Pearce
2007-05-21 12:09 ` Petr Baudis
2007-05-21 19:54 ` René Scharfe
2007-05-22 22:26 ` René Scharfe
2007-05-22 22:54 ` Junio C Hamano
2007-05-22 23:44 ` René Scharfe [this message]
2007-05-23 5:22 ` Shawn O. Pearce
2007-05-20 11:20 ` René Scharfe
2007-05-20 16:10 ` Thomas Glanzmann
2007-05-20 16:28 ` Brian Gernhardt
2007-05-20 16:30 ` Thomas Glanzmann
2007-05-21 6:19 ` Peter Baumann
2007-05-21 6:24 ` Thomas Glanzmann
2007-05-21 6:29 ` Shawn O. Pearce
2007-05-21 6:37 ` Thomas Glanzmann
2007-05-21 6:53 ` Shawn O. Pearce
2007-05-21 7:00 ` Thomas Glanzmann
2007-05-21 6:56 ` Brian Gernhardt
2007-05-21 7:02 ` Thomas Glanzmann
2007-05-17 17:48 ` Frank Lichtenheld
2007-05-17 18:05 ` Johan Herland
2007-05-17 17:02 ` Kristian Høgsberg
2007-05-17 17:13 ` Thomas Glanzmann
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=46538065.9080705@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire$(echo .)ath.cx \
--cc=frank@lichtenheld$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=johan@herland$(echo .)net \
--cc=junkio@cox$(echo .)net \
--cc=simigern@cip$(echo .)informatik.uni-erlangen.de \
--cc=spearce@spearce$(echo .)org \
--cc=thomas@glanzmann$(echo .)de \
--cc=torvalds@linux-foundation$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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