Skip to content

Expose the commit's tree-hash #238

@itoshkov

Description

@itoshkov

Describe the idea (required)

Git commits that contain exactly the same files will have different commit hashes, but the same tree hash. For example, a merge or a squashed commit that is exactly the same as the merged/squashed branch will exhibit this. Also commits modified through git commit --amend.

Exposing this information can be useful for CI scripts to identified already built or tested artifacts.

The tree hash can be seen using git cat-file commit HEAD. (There may be other ways too.)

Tell us about the expected behaviour (required)

Make the tree hash available through a variable like git.commit.tree_hash.

Context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions