Re: [PATCH 2/3] archive: specfile support (--pretty=format: in archive files)
From: David Kastrup <hidden>
Date: 2016-06-15 22:43:33
Johannes Schindelin [off-list ref] writes:
On Mon, 3 Sep 2007, Ren? Scharfe wrote:quoted
Add support for a new attribute, specfile. Files marked as being specfiles are expanded by git-archive when they are written to an archive. It has no effect on worktree files. The same placeholders as those for the option --pretty=format: of git-log et al. can be used.I almost like this approach. Would it not be a little more useful if you could mark the placeholders with something like "$Format: xyz %c$"? Because then we could just shut up all those complainers that want to insert some revision specific information into the files, without affecting formats for printf(). Of course, the idea to keep the worktree unaffected is brilliant.
I think a bit more layering would be helpful: when using git-svn, one would want to have things like $Id$ and $Date$ expanded, so maybe attribute specs like somefile: expandmarkers="$Date: %aD$ $Id: ....$" would be nice having. In the case of git-svn, I would expect them to be generated from git-svn from the respective svn properties, so that the user is not bothered with figuring out the awful $Id$ and whatever strings. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum