Hub merge assumes wrong repository name #379

Closed
bantu opened this Issue Aug 14, 2013 · 5 comments

Comments

Projects
None yet
2 participants

bantu commented Aug 14, 2013

Hub merge does not work when the pull requester has renamed his repository (e.g. due to naming conflicts).

afischer@leonard:/tmp$ hub clone owncloud/core
Cloning into 'core'...
remote: Counting objects: 192442, done.
remote: Compressing objects: 100% (48489/48489), done.
remote: Total 192442 (delta 153061), reused 180214 (delta 141330)
Receiving objects: 100% (192442/192442), 59.55 MiB | 1.44 MiB/s, done.
Resolving deltas: 100% (153061/153061), done.

afischer@leonard:/tmp$ cd core

afischer@leonard:/tmp/core (master) $ hub merge https://github.com/owncloud/core/pull/4302
fatal: Couldn't find remote ref refs/heads/master
Unexpected end of command stream

This fails because the repository forked from owncloud/core as at synchrone/core-1.

https://api.github.com/repos/owncloud/core/pulls/4302 provides the correct data for this which should probably be used.

The following works:

afischer@leonard:/tmp/core (master) $ hub merge https://github.com/owncloud/core/pull/4434
From https://github.com/owncloud/core
 * [new branch]      fix_octemplate_escaping -> owncloud/fix_octemplate_escaping
Merge made by the 'recursive' strategy.
 core/js/octemplate.js | 8 ++++----
 lib/base.php          | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
afischer@leonard:/tmp/core (master) $ hub merge https://github.com/owncloud/core/pull/4422
remote: Counting objects: 19, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 11 (delta 9), reused 4 (delta 2)
Unpacking objects: 100% (11/11), done.
From https://github.com/M4ui/core
 * [new branch]      master     -> M4ui/master
Auto-merging apps/files/js/filelist.js
Merge made by the 'recursive' strategy.
 apps/files/js/filelist.js | 2 +-
 core/ajax/share.php       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Member

mislav commented Aug 14, 2013

Thanks for the investigative work! Yes, I'm not surprised that edge case bugs like this pop up when someone renamed their repo. I'm slowly transitioning from guessing how things are named to actually looking it up via API.

bantu commented Mar 6, 2014

@mislav Any updates on this?

Member

mislav commented Mar 6, 2014

Nope, didn't have time to look into this yet. Anyone is welcome to beat me to it

Member

mislav commented Mar 8, 2014

mislav closed this Mar 8, 2014

bantu commented Mar 8, 2014

@mislav Much appreciated. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment