Skip to content
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
@pnegahdar

Description

@pnegahdar

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions