The GitHub Actions job "Java CI" on commons-codec.git/feat/git-blob has failed.
Run started by GitHub user ppkarwasz (triggered by ppkarwasz).

Head commit for run:
0cf17cdcefcf01cb59b1a95a562e158de5ea2429 / Piotr P. Karwasz 
<[email protected]>
CODEC-335: Add `DigestUtils.gitBlob` and `DigestUtils.gitTree` methods

This change adds two methods to `DigestUtils` that compute generalized Git 
object
identifiers using an arbitrary `MessageDigest`, rather than being restricted to 
SHA-1:

- `gitBlob(digest, input)`: computes a generalized
  [Git blob object 
identifier](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) for a 
given file or byte content.
- `gitTree(digest, file)`: computes a generalized
  [Git tree object 
identifier](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) for a 
given directory.

### Motivation

The standard Git object identifiers use SHA-1, which is
[in the process of being replaced by 
SHA-256](https://git-scm.com/docs/hash-function-transition) in Git itself.
These methods generalize the identifier computation to support any 
`MessageDigest`,
enabling both forward compatibility and use with external standards.

In particular, the `swh:1:cnt:` (content) and `swh:1:dir:` (directory) 
identifier
types defined by [SWHID (ISO/IEC 
18670)](https://www.swhid.org/specification/v1.2/5.Core_identifiers/) are 
currently compatible with
Git blob and tree identifiers respectively (using SHA-1), and can be used to 
generate
canonical, persistent identifiers for unpacked source and binary distributions.

Report URL: https://github.com/apache/commons-codec/actions/runs/23606452376

With regards,
GitHub Actions via GitBox

Reply via email to