Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Infra plans regarding $Id$ - official answer...
Date: Sat, 15 Aug 2015 14:48:18
Message-Id: CAGfcS_=BP9ivbok1FdPDcPQiNaBEuXb1VsvPOpjDJW5M34XK1A@mail.gmail.com
In Reply to: Re: [gentoo-dev] Infra plans regarding $Id$ - official answer... by Peter Stuge
1 On Sat, Aug 15, 2015 at 8:44 AM, Peter Stuge <peter@×××××.se> wrote:
2 >
3 > $ git ls-tree HEAD README
4 > 100644 blob 08ae16956b8944da2fef75fee892dcba457cf4f0 README
5 > $
6 >
7 > $ (stat --printf='blob %s\0' README; cat README) | sha1sum
8 > 08ae16956b8944da2fef75fee892dcba457cf4f0 -
9 > $
10 >
11 > This is so simple to generate that it doesn't really need a
12 > placeholder in every ebuild in the repository.
13 >
14
15 Additionally, sha1sum tells you what was actually used, not what the
16 hash was the last time it was seen by git. If a file is modified
17 after the fact sha1sum will catch that.
18
19 Maybe you care where it originally came from, but I'm not sure that it
20 really matters - if the user isn't using the actual ebuild out of the
21 tree they should be attaching it to the bug anyway. And if you care
22 that much where the ebuild came from you should be storing it in git
23 in the first place.
24
25 --
26 Rich