Skip to content

Conversation

@mmhat
Copy link

@mmhat mmhat commented Sep 30, 2025

This PR adds a new (optional) attribute object_format to the git_fetch rule. If given, the values of the attribute must be one of sha1 or sha256, and its value is used for the initialization of the underlying Git repository (e.g. git init --object-format sha1).

The given rev is validated according to the chosen object format; If none is provided we still check if the rev is a valid SHA1 digest, but we do not pass the --object-format option to Git.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 30, 2025
@mmhat mmhat force-pushed the prelude-object-format branch from b5860d2 to 1d1d054 Compare October 6, 2025 00:15
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Oct 6, 2025

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D83531241. (Because this pull request was imported automatically, there will not be any future comments.)

@mmhat mmhat force-pushed the prelude-object-format branch from 1d1d054 to c4bbd0f Compare October 13, 2025 22:19
Summary:
This commit adds a new (optional) attribute `object_format` to the git_fetch
rule. If given, the values of the attribute must be one of `sha1` or `sha256`,
and its value is used for the initialization of the underlying Git repository
(e.g. `git init --object-format sha1`).

The given `rev` is validated according to the chosen object format; If
none is provided we still check if the `rev` is a valid SHA1 digest, but
we do not pass the --object-format option to Git.
@mmhat mmhat force-pushed the prelude-object-format branch from c4bbd0f to 070110d Compare October 13, 2025 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant