POST hook missing branch name on push with multiple commits

Issue #8021 duplicate
Steve Muskiewicz
created an issue

I've been testing Bitbucket POST hooks and found an issue when I push multiple commits from a branch. The POST data that I'm getting back is showing "branch: null" for the first commit in the set, even though the commit was against my master branch.

(The subsequent commit entry did contain the proper "branch: master" data so it's not entirely broken).

Here's a sample of the POST data that shows the issue:

'{"repository": {"website": "", "fork": false, "name": "PROTO_PXAP_1", "scm": "git", "owner": "plexxi", "absolute_url": "/plexxi/proto_pxap_1/", "slug": "proto_pxap_1", "is_private": true}, "truncated": false, "commits": [{"node": "213e69924726", "files": [{"type": "modified", "file": "PlexxiControl/pom.xml"}], "branch": null, "utctimestamp": "2013-08-29 15:07:54+00:00", "timestamp": "2013-08-29 17:07:54", "raw_node": "213e69924726c17486b8818302dba6edac15f962", "message": "Change dependency plugin version\n", "size": -1, "branches": [], "author": "joe_plexxi", "parents": ["ccee8c389890"], "raw_author": "Joe Plexxi", "revision": null}, {"node": "ed5b516d865f", "files": [{"type": "modified", "file": "PlexxiControl/pom.xml"}], "branch": "master", "utctimestamp": "2013-08-29 15:14:16+00:00", "timestamp": "2013-08-29 17:14:16", "raw_node": "ed5b516d865f7454029e7cd61497a38326d6d533", "message": "updated release plugin version\n", "size": -1, "author": "joe_plexxi", "parents": ["213e69924726"], "raw_author": "Joe Plexxi", "revision": null}], "canon_url": "", "user": "joe_plexxi"}'

This also manifests itself in the email hook, the email shows "None" on one of the changesets:

2 new commits in PROTO_PXAP_1:
Changeset:   213e69924726
Branch:      None
User:        joe_plexxi
Date:        2013-08-29 17:07:54
Summary:     Change dependency plugin version

Affected #:  1 file
Changeset:   ed5b516d865f
Branch:      master
User:        joe_plexxi
Date:        2013-08-29 17:14:16
Summary:     updated release plugin version

Affected #:  1 file

Repository URL:

Please let me know if I can provide any additional info.

Comments (4)

  1. Brian Nguyen

    Hi Tim,

    The fact that a branch is only applied to the last commit is a feature of git's light-weight branching system, and this is not something we intend to change.

    Cheers, Brian

  2. Log in to comment