feat: add ability to push and fetch stacked diffs metadata
- 
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo. 
Add ability to push and fetch stacked diffs metadata
Problem to solve
Currently, reviewers cannot easily check out a diff stack locally because the ref entries in $GIT_DIR/refs/stacked/ do not follow the established ref format of containing a single git object reference.
Proposal
This PR refactors the entries in $GIT_DIR/refs/stacked to point to a git object created via git hash-object. The stored git object can be pushed upstream, and the refs can be pushed and fetched using git push and git fetch.
Implementation details
- Modified Stackstruct instack_struct.goto include aMetadataHashfield.
- Updated CreateStackfunction instacked.goto create a Git object for stack metadata usinggit hash-object.
- Added PushStackMetadataandFetchStackMetadatafunctions tostack_struct.gofor pushing and fetching stack metadata.
- Updated relevant tests in stack_struct_test.goandstacked_test.go.
Related Issues
Fixes #7631
Edited  by 🤖 GitLab Bot 🤖