Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Push: RefSpec deleting reference does not work #466

Closed
ajnavarro opened this issue Jul 7, 2017 · 1 comment
Closed

Push: RefSpec deleting reference does not work #466

ajnavarro opened this issue Jul 7, 2017 · 1 comment
Assignees
Labels

Comments

@ajnavarro
Copy link
Contributor

Example:

r, err := git.PlainOpen(path)
	CheckIfError(err)

	Info("git push")
	err = r.Push(&git.PushOptions{
		RefSpecs: []config.RefSpec{
			config.RefSpec(":master"),
		},
	})
	CheckIfError(err)

Obtained error:

error: already up-to-date

Expected message:

$ git push origin :master
To file://path/to/remote/go-git-remote
 - [deleted]         master
@ajnavarro ajnavarro added the bug label Jul 7, 2017
ajnavarro added a commit to ajnavarro/borges that referenced this issue Jul 7, 2017
We need to take into account the initCommit to be able to update correctly the references, not only by the reference name.

- Added a new test dropping one reference going from 9 to 8
- Ignoring archiver test due to bug in go-git: src-d/go-git#466
ajnavarro added a commit to ajnavarro/borges that referenced this issue Jul 7, 2017
We need to take into account the initCommit to be able to update correctly the references, not only by the reference name.

- Added a new test dropping one reference going from 9 to 8
- Ignoring archiver test due to bug in go-git: src-d/go-git#466
@smola smola self-assigned this Jul 7, 2017
@smola
Copy link
Collaborator

smola commented Jul 7, 2017

Fixed here: #467

mcuadros added a commit that referenced this issue Jul 7, 2017
remote: fix push delete, closes #466
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants