{"action":"created","issue":{"url":"https://api.github.com/repos/gmarik/Vundle.vim/issues/593","labels_url":"https://api.github.com/repos/gmarik/Vundle.vim/issues/593/labels{/name}","comments_url":"https://api.github.com/repos/gmarik/Vundle.vim/issues/593/comments","events_url":"https://api.github.com/repos/gmarik/Vundle.vim/issues/593/events","html_url":"https://github.com/gmarik/Vundle.vim/issues/593","id":70306505,"number":593,"title":"Updates go wrong when local repo is on another branch","user":{"login":"sim590","id":4147254,"avatar_url":"https://avatars.githubusercontent.com/u/4147254?v=3","gravatar_id":"","url":"https://api.github.com/users/sim590","html_url":"https://github.com/sim590","followers_url":"https://api.github.com/users/sim590/followers","following_url":"https://api.github.com/users/sim590/following{/other_user}","gists_url":"https://api.github.com/users/sim590/gists{/gist_id}","starred_url":"https://api.github.com/users/sim590/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sim590/subscriptions","organizations_url":"https://api.github.com/users/sim590/orgs","repos_url":"https://api.github.com/users/sim590/repos","events_url":"https://api.github.com/users/sim590/events{/privacy}","received_events_url":"https://api.github.com/users/sim590/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-23T04:42:25Z","updated_at":"2015-04-24T20:52:15Z","closed_at":"2015-04-24T07:57:24Z","body":"Let's say I've implemented a change for a distant repository on another branch and I'm waiting for my PR to get merged. It may not be merged in the next update, and when updating local repository, I'd like to keep changes I've implemented. However, these lines happen :\r\n```vim\r\nlet cmd_parts = [\r\n      \\ 'cd '.vundle#installer#shellesc(a:bundle.path()) ,\r\n      \\ 'git remote set-url origin ' . vundle#installer#shellesc(a:bundle.uri),\r\n      \\ 'git fetch',\r\n      \\ 'git reset --hard origin/HEAD',\r\n      \\ 'git submodule update --init --recursive',\r\n      \\ ]\r\n\r\n```\r\nIf I was on branch `vimdoc` because I've implemented documentation for the repository, instead of `reset`'ing `master` to `origin/HEAD`, it's `reset`'ting `vimdoc`. That's a bit annoying. May be, Vundle could detect if it's not on `master` branch and prompt an `input()` and ask if update anyway?\r\n\r\nI'm positive these lines happen because : \r\n\r\n```\r\n* fb14805 (myfork/vimdoc) adding vimdoc file under ./doc/\r\n*   c4975a4 (HEAD, origin/master, origin/HEAD, vimdoc, master) Merge pull request #184 from ciros\r\n```\r\n\r\n**Notice** that `vimdoc` branch is behind `myfork/vimdoc`."},"comment":{"url":"https://api.github.com/repos/gmarik/Vundle.vim/issues/comments/96062062","html_url":"https://github.com/gmarik/Vundle.vim/issues/593#issuecomment-96062062","issue_url":"https://api.github.com/repos/gmarik/Vundle.vim/issues/593","id":96062062,"user":{"login":"sim590","id":4147254,"avatar_url":"https://avatars.githubusercontent.com/u/4147254?v=3","gravatar_id":"","url":"https://api.github.com/users/sim590","html_url":"https://github.com/sim590","followers_url":"https://api.github.com/users/sim590/followers","following_url":"https://api.github.com/users/sim590/following{/other_user}","gists_url":"https://api.github.com/users/sim590/gists{/gist_id}","starred_url":"https://api.github.com/users/sim590/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sim590/subscriptions","organizations_url":"https://api.github.com/users/sim590/orgs","repos_url":"https://api.github.com/users/sim590/repos","events_url":"https://api.github.com/users/sim590/events{/privacy}","received_events_url":"https://api.github.com/users/sim590/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T20:52:15Z","updated_at":"2015-04-24T20:52:15Z","body":"> it does not prevent you from doing what you want, it will just not work well if you do thing in a way that is unexpected for Vundle. And I am not saying this will necessarily stay this way forever, I'm only saying, that the fact that you cannot do what you want to do is not unexpected and not a bug.\r\n\r\nI understand. I was hoping we could make it so that it doesn't break in that case by a simple fix. After all, I don't know the project as well as you.\r\n\r\n> You do your PR, check it out in your plugin within the bundle dir, I've done that too, that's what pinned is for. Then keeping this up to date means fetching, rebasing, etc, a completely different workflow than just pulls to master, so Vundle cannot do that for you.\r\n\r\nIf the URI of the local repository is the one Vundle expects, it won't reset my branch and then, I don't need pin, but I'm glad to know this option exists!\r\n\r\nI appreciate the time you guys took to answer my questions. Thank you."}}