On Sun, Aug 16, 2015 at 12:33:05PM -0500, William Hubbs wrote: > On Sat, Aug 15, 2015 at 02:44:47PM +0200, Peter Stuge wrote: > > Hi and happy Git days! :) > > > > > > Robin H. Johnson wrote: > > > It expands to the hash of the blob of that file; and from that, you can > > > identify which commits the blob exists in. > > > > $ git ls-tree HEAD README > > 100644 blob 08ae16956b8944da2fef75fee892dcba457cf4f0 README > > $ > > > > $ (stat --printf='blob %s\0' README; cat README) | sha1sum > > 08ae16956b8944da2fef75fee892dcba457cf4f0 - > > $ > > > > This is so simple to generate that it doesn't really need a > > placeholder in every ebuild in the repository. It's ONLY applicable if the file has never been modified. If the file has been modified, then unless you know exactly what the modifications were (or have a backup before modifications), you cannot figure out the exact source.
> If this is this simple to regenerate, consider my response here a very > strong +1; let's kill $id$ out of the git repository and generate this > some how at the rsync level if users need it or give them a tool that > will generate it. Ebuilds are NOT the only place where it's relevant, but they have a similar use case to the other places. Ebuild: - User copies .ebuild with expanded $Id$ to /usr/local/portage/... - User modifies local ebuild copy - User submits changed ebuild to bugzilla - Developer uses Header/Id to figure out what to base a diff on for merging. Non-ebuild - Package installs /etc/init.d/foobar, with some bug - User reports it is buggy - User modifies it to temporarily work around the bug - User submits modified version back - Developer asks what the original version was if it didn't have some useful marker in the file. Example of old marker: /etc/init.d/nfs:# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.26 2011/09/18 01:51:51 vapier Exp $ > I don't object to someone having a way to get this information if it > is useful to them, but I don't think we need a placeholder for it in the > git repository. If we don't have a placeholder for where to inject it, how do we know where it's safe to inject? -- Robin Hugh Johnson Gentoo Linux: Developer, Infrastructure Lead E-Mail : robb...@gentoo.org GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85