On Sat, Aug 15, 2015 at 8:44 AM, Peter Stuge <pe...@stuge.se> wrote:
>
> $ 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.
>

Additionally, sha1sum tells you what was actually used, not what the
hash was the last time it was seen by git.  If a file is modified
after the fact sha1sum will catch that.

Maybe you care where it originally came from, but I'm not sure that it
really matters - if the user isn't using the actual ebuild out of the
tree they should be attaching it to the bug anyway.  And if you care
that much where the ebuild came from you should be storing it in git
in the first place.

-- 
Rich

Reply via email to