1 |
On Sun, Aug 16, 2015 at 12:33:05PM -0500, William Hubbs wrote: |
2 |
> On Sat, Aug 15, 2015 at 02:44:47PM +0200, Peter Stuge wrote: |
3 |
> > Hi and happy Git days! :) |
4 |
> > |
5 |
> > |
6 |
> > Robin H. Johnson wrote: |
7 |
> > > It expands to the hash of the blob of that file; and from that, you can |
8 |
> > > identify which commits the blob exists in. |
9 |
> > |
10 |
> > $ git ls-tree HEAD README |
11 |
> > 100644 blob 08ae16956b8944da2fef75fee892dcba457cf4f0 README |
12 |
> > $ |
13 |
> > |
14 |
> > $ (stat --printf='blob %s\0' README; cat README) | sha1sum |
15 |
> > 08ae16956b8944da2fef75fee892dcba457cf4f0 - |
16 |
> > $ |
17 |
> > |
18 |
> > This is so simple to generate that it doesn't really need a |
19 |
> > placeholder in every ebuild in the repository. |
20 |
It's ONLY applicable if the file has never been modified. If the file |
21 |
has been modified, then unless you know exactly what the modifications |
22 |
were (or have a backup before modifications), you cannot figure out the |
23 |
exact source. |
24 |
|
25 |
> If this is this simple to regenerate, consider my response here a very |
26 |
> strong +1; let's kill $id$ out of the git repository and generate this |
27 |
> some how at the rsync level if users need it or give them a tool that |
28 |
> will generate it. |
29 |
Ebuilds are NOT the only place where it's relevant, but they have a |
30 |
similar use case to the other places. |
31 |
|
32 |
Ebuild: |
33 |
- User copies .ebuild with expanded $Id$ to /usr/local/portage/... |
34 |
- User modifies local ebuild copy |
35 |
- User submits changed ebuild to bugzilla |
36 |
- Developer uses Header/Id to figure out what to base a diff on for |
37 |
merging. |
38 |
|
39 |
Non-ebuild |
40 |
- Package installs /etc/init.d/foobar, with some bug |
41 |
- User reports it is buggy |
42 |
- User modifies it to temporarily work around the bug |
43 |
- User submits modified version back |
44 |
- Developer asks what the original version was if it didn't have some |
45 |
useful marker in the file. |
46 |
|
47 |
Example of old marker: |
48 |
/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 $ |
49 |
|
50 |
> I don't object to someone having a way to get this information if it |
51 |
> is useful to them, but I don't think we need a placeholder for it in the |
52 |
> git repository. |
53 |
If we don't have a placeholder for where to inject it, how do we know |
54 |
where it's safe to inject? |
55 |
|
56 |
-- |
57 |
Robin Hugh Johnson |
58 |
Gentoo Linux: Developer, Infrastructure Lead |
59 |
E-Mail : robbat2@g.o |
60 |
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 |