Issue #8991 resolved

Branches field in commit detail is questionable

David Musicant
created an issue

When looking at the commit detail for a git repository, such as this one there is a field on the right-hand side labeled "Branches" that seems to be wrong, or at least, unclear. For this particular commit I've linked to (i.e., 4fe9d15), it shows "master" as the branch. But that commit has two different branches as descendants: "master" and "side"; both of these tips can be seen as descending from this commit in this overview. Perhaps this branches field is intended to indicate which branch the project was on when the commit was made, but to the best of my knowledge this can't be done; this info is only available in the reflog, which isn't pushed.

Is this a bug and "branches" should show all descendant branches (which it doesn't), or a poorly documented feature? If the latter, what is this field showing?

Comments (4)

  1. Jon Mooring staff

    Hi David Musicant,

    This test repository might help better explain what the branches metadata is telling you: https://bitbucket.org/jonmooring/test-repo/commits/all

    By looking at the graph and list of commits you can see that b06f341 is the only commit that displays branch information because it is the only commit that does not exist on the main branch. This information is particularly useful if you're working on a feature and branching from your feature branch to complete sub-tasks but have not yet merged your work back into the main line.

    Hope this helps clear up the confusion.

    Thanks,
    Jon

  2. David Musicant reporter

    Hi Jon -

    Whoa -- the whole commit detail page (right hand side) has changed from what it looked like when I posted this issue. Was that as a result of this, or coincidental? Specifically, the issue I posted isn't even accurate anymore; now it no longer shows a branch for commit 4fe9d15, whereas when I posted the issue every single commit showed a branch.

    Your answer makes sense as an explanation as to what I see, though I'd humbly suggest that this is confusing as all heck, and the interface should be changed. In your example: commit b06f341 is the only commit that displays branch information, because it is the only commit that does not exist in the main branch; yet when you look at the main commits window and filter the branches by branch "test-branch", you see three commits. So the detail doesn't show test-branch for the other two commits (805dadd, 3b0134a), whereas the branch listing filter does... and both of these different definitions of "branch" are further different than the git definition, which is a pointer to a single commit. I now understand it, and I appreciate your help, but this looks to me to be a user interface flaw. I could never have figured out what that branch field was doing without your explicit help (and thank you for that).

    Would it be appropriate for me to reopen this issue as a user interface fix?

  3. Log in to comment