Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Commits to feature branch should be linked to actual issue or ?

JIRA Autobot November 24, 2013

Hi,

I am evaluating jira + stash integration. I have made a feature branch dirrectly from JIRA then i commit something into that branch. I wish that stash detected those changes inside that branch as changes on that specifix issue that i created the branch for so i don't have a branch feature/MYISSUE-10 bla bla then when i commit i have to put MYISSUE-10 in the commit message.

I know that it would not make sense in all cases but maybe in this spceific case where a branch has an known issue name then it could detect it.

Anyone has a simmilar request ?

/donnib

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2013

The main reason why Stash doesn't consider the branch name when linking commits to issues is that branches in git are transient.

In git, a branch is simply a pointer to a commit. Any commit that is an ancestor of that commit is considered to be 'on' the branch. This means that a commit can be on multiple branches at the same time and also that the set of branches a commit is on can change over time as branches are added and deleted.

If Stash would consider the branch name when matching a commit to an issue, it would all depend on when Stash first sees the commit and what branch(es) it is on at that time. If you delete the branch and Stash would ever need to rebuild its commit -> issue mapping, all hints would be gone and it would not be able to map them anymore.

JIRA Autobot November 25, 2013

@Michael thank you very much for the thoroughly explanation. That makes totally sense why it is like that.

Landon Fuller February 2, 2014

The assumption that branches are transient is a question of workflow, not an innate facet of git. We never remove branches from git, as doing so destroys history. In our environment, branches provide a perfect mapping.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2013

Yes, this would be a good imprvement.

0 votes
Andrzej Pasterczyk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2013

Hi,

Jira 6.1 + Stash 2.8 should have a feature to create branch for JIRA issue. See https://answers.atlassian.com/questions/207287/create-a-git-stash-branch-from-jira

Edit

Or maybe I am wrong. Based on last comment here you wont get what your after http://blogs.atlassian.com/2013/10/stash-28-git-branch-workflows/

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events