This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Hash and Head in push refspec #875
Open
Description
It seems like the following works fine:
err = repo.Repo.PushContext(ctx, &git.PushOptions{
RemoteName: "my_remote",
RefSpecs: []gitConfig.RefSpec{
"refs/heads/my_branch:/refs/heads/my_branch",
},
})
But when the left reference is a <SHA>
or HEAD
it does not. e.g.:
err = repo.Repo.PushContext(ctx, &git.PushOptions{
RemoteName: "my_remote",
RefSpecs: []gitConfig.RefSpec{
"25309f687635b3e740c16bcb9c0c37bd0516ab03:/refs/heads/my_branch",
},
})
Is this by design (git CLI supports it)? Can investigate if it isn't.