IDEA-67875 Fix update and push for empty repositories.
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Mon, 11 Apr 2011 12:18:06 +0000 (16:18 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Mon, 11 Apr 2011 12:19:09 +0000 (16:19 +0400)
commit7f9709ca69c5a4a6c84d8c7af92450d1def559c2
tree022a96ffb0eb52937d683941c0f692dc30f545bf
parent1c58d7dcdd021bf1da484a76bf25589b365cd4e1
IDEA-67875 Fix update and push for empty repositories.

When the remote doesn't have the branch which current branch tracks (for example, an empty repository was cloned, nothing is on origin/master yet), we shouldn't query this remote branch.

GitBranch.exists() checks if the branch really exists: searches /refs/remotes/ and packed-refs.
GitUpdateProcess shows notification that branch doesn't exist yet and doesn't update.
GitPushActiveBranches correctly displays commit that are to be pushed.
plugins/git4idea/src/git4idea/GitBranch.java
plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java
plugins/git4idea/src/git4idea/update/GitUpdateProcess.java