DESCRIPTION

[RFC] Show detailed branch status in label decoration of project

The branch status is shown after the branch name in the decoration if
the current branch is different from the remote tracking branch. This is
useful as a visual indication that the branch needs to be pushed (or
merged/rebased).

If there are commits on the branch that are not on the tracking branch,
an upwards arrow (↑) followed by the number of commits is shown. This
can be read as "the branch is N commits ahead" or "N commits need to be
pushed".

If there are commits on the tracking branch that are not on the local
branch, a downwards arrow (↓) is shown, followed by the number of
commits. This can be read as "the branch is N commits behind" or "N
commits need to be merged".

For example, if there are 2 unpushed commits on master, the project is
now shown like this:

  project [repo master ↑2]

If there are both unpushed and unmerged commits (the branches have
diverged), it's shown like this:

  project [repo master ↑2 ↓1]

In C Git, information about the tracking branch is displayed in "git
status" output. EGit currently doesn't have any indication that a branch
needs to be pushed, apart from the labels in History View. When there
are multiple repositories involved, it can easily happen that a push is
forgotten. This change helps to prevent that.

This depends on JGit change I8d2b108c89905c3f0496f3d517879596740787c0.

Change-Id: I1e1caca561d1b0a0c194bfc42e64b698f42c6e6a
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Danika Greer
date: 2011-12-04 11:15:56.000000000

Uploaded patch set 2.

-------------------------------------
author: Danika Greer
date: 2011-12-04 11:20:56.000000000

Patch Set 2:

Changes:

- Move logic for calculating branch status to jgit (and add unit tests)
- Also show branch status in Git Repositories view
- Fix leading/trailing space issue by extending decoration format

-------------------------------------
