On Fri, 3 Aug 2007, Andy Parkins wrote: > > I want to write a little recipe in a Makefile that ensures the $Id$ field in a > series of text files is correct. In case it's relevant, I'm including a load > of asciidoc files as subsections into one master file; each file has a $Id$ > field in the header, which very nicely prints out at the start of each > section. However, the $Id$ field is only written on checkout (not on checkin > for fairly obvious reasons). That means that for any files I've changed, the > $Id$ is wrong. Before I generate output using ASCIIdoc I'd like to ensure > the $Id$ is correct. > > How do I do it? Something like git read-tree HEAD git checkout -f should do it. The read-tree basically invalidated the index, by forcing it to the HEAD tree (and *without* doing a merge with the old index, so it doesn't get any of the size/date/inode fields right). And at that point, git thinks that all files are stale, so "git checkout -f" will force the checkout for all of them. I'm sure you can do it other ways too, but that's the "obvious" one. Linus - 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