[go: up one dir, main page]

Skip to content

Add an option to `git replay` so it can update the refs

Now that the patch series creating the git replay command has been merged into the master branch, we can improve this new command and add useful features.

Right now when there are no conflicts, the command outputs line like:

update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH}
update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH}
update refs/heads/branch3 ${NEW_branch3_HASH} ${OLD_branch3_HASH}

that can be used as an input to git update-ref --stdin. We could implement an option perhaps --update that directly updates the refs that should be updated according to the current output.

It especially worth doing as we plan to use the command to simplify and speed up Gitaly, and this feature would probably help.

/cc @jcaigitlab