FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.45k stars 638 forks source link

Attempt to move remote branch on remote other than origin not working #301

Closed Ajedi32 closed 10 years ago

Ajedi32 commented 10 years ago

I have a repository with two remotes. One named origin, and another named other-remote (just an example). temp is a branch on my repository. origin/temp and other-remote/temp both exist, but cannot be fast-forwarded to temp.

When I drag and drop other-remote/temp to the move button next to the commit that temp is on, I am prompted to force-push, and click "Yes". So far so good.

Now here's the problem: Ungit moves origin/temp to the same commit as temp, and leaves other-remote/temp unchanged. Any further attempt to move other-remote/temp fails silently.

I'm guessing the cause of this bug will be obvious, but just in case it's not, here's the console output for my attempt to move other-remote/temp after origin/temp has already been moved:

$ ungit
info: BugTracker set version: 0.6.1
info: BugTracker set user hash
info: BugTracker set version: 0.6.1
2014-02-04T13:57:38.716Z - info: socket.io started
2014-02-04T13:57:38.716Z - info: Listening on port 8448
Browse to http://localhost:8448/#/repository?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject
Took 549ms to start server.
## Ungit started ##
2014-02-04T13:57:38.723Z - info: BugTracker set user hash
info: Sending to keen.io: server-start {"launchTimeMs":549,"version":"0.6.1","userHash":"5970680fd47796250d2ad4a53e1d3827"}
2014-02-04T13:57:39.528Z - info: GET /
2014-02-04T13:57:39.569Z - info: GET /css/styles.css
2014-02-04T13:57:39.574Z - info: GET /serverdata.js
2014-02-04T13:57:39.575Z - info: GET /js/raven.min.js
2014-02-04T13:57:39.577Z - info: GET /js/ungit.js
2014-02-04T13:57:40.388Z - info: handshake authorized For5yVAbn5dvRO9_MJ8c
2014-02-04T13:57:40.523Z - info: GET /images/logo.png
2014-02-04T13:57:40.526Z - info: GET /api/latestversion
2014-02-04T13:57:40.696Z - info: GET /api/quickstatus?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:40.748Z - info: Start watching /media/SYSTEM/Documents and Settings/ajedi32/My Documents/Workspace/Training Hub/Training Hub Workspace/training_hub
2014-02-04T13:57:40.748Z - info: GET /api/status?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:40.749Z - info: GET /api/stashes?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:40.754Z - info: GET /api/log?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&limit=25&socketId=0
2014-02-04T13:57:40.762Z - info: GET /api/checkout?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:40.763Z - info: GET /api/remotes?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:40.885Z - info: GET /api/remote/tags?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&remote=origin&socketId=0
2014-02-04T13:57:40.892Z - info: POST /api/fetch
2014-02-04T13:57:43.103Z - info: emitting git-directory-changed to sockets, manually triggered
2014-02-04T13:57:43.112Z - info: GET /api/stashes?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:43.119Z - info: GET /api/log?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&limit=25&socketId=0
2014-02-04T13:57:43.119Z - info: GET /api/checkout?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:43.120Z - info: GET /api/remotes?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:47.261Z - info: GET /api/status?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:48.420Z - info: POST /api/push
2014-02-04T13:57:49.575Z - info: emitting git-directory-changed to sockets, manually triggered
2014-02-04T13:57:49.578Z - info: GET /api/stashes?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:49.589Z - info: GET /api/log?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&limit=25&socketId=0
2014-02-04T13:57:49.589Z - info: GET /api/checkout?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:49.589Z - info: GET /api/remotes?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
2014-02-04T13:57:58.137Z - info: GET /api/status?path=%2Fmedia%2FSYSTEM%2FDocuments%20and%20Settings%2Fajedi32%2FMy%20Documents%2FWorkspace%2Fproject&socketId=0
Ajedi32 commented 10 years ago

It looks like I'm having the same issue even when the push is a fast-forward.

Ajedi32 commented 10 years ago

Something similar seems to also be occurring when I try to delete remote branches... I'm guessing there's something in ungit written with the assumption that all remote branches are on origin?

ungit 1

Ajedi32 commented 10 years ago

Awesome, thanks for the fix!

FredrikNoren commented 10 years ago

Thanks for the report :)