Smart Commit hashtag command appearing in commit message

martin.woods February 28, 2020

Hi,

I'm using smart commits from my command line when working with my repos and I find it to be quite useful, especially when updating JIRA tickets

My only problem with it is when I look at the commit messages in Bitbucket it lists the smart commit command as part of the commit message. Which looks terrible when you view it in the BB GUI

Example

Lets say I issue the following commit message from bash:

git commit -am 'DEVOPS-380 #comment Test Comment 1'

If I then view the message in my JIRA ticket I see it as:

Test Comment 1

If I look at the commit history in Bitbucket I see it as:

DEVOPS-380 #comment Test Comment 1

 

I don't want the '#comment' command to appear in my commit history in Bitbucket - I assume this NOT what you want the functionality to do either?

 

Bitbucket Version - "Atlassian Bitbucket v6.4.1"

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2020

Hi Martin,

This is the expected behaviour - Bitbucket Server always displays the entire commit message.

Cheers,

Christian

Premier Support Engineer

Atlassian

martin.woods February 28, 2020

Hi @Christian Glockner - thanks for the quick reply

Can I ask why is it expected behavior - as in what purpose does it serve to the have the Smart Commit command visible in the commit message in BB?

From my point-of-view I cannot see any real purpose for it there and it just looks ugly and adds unnecessary data to the screen

Happy to be corrected by you though if you can point out something obvious that I'm missing :)

Many Thanks,

Martin 

Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2020

Hi Martin,

Keep in mind that not every Bitbucket Server customer is necessarily using Jira (i.e. not every customer is making use of Smart Commits), but may well have a good reason for using strings like "#comment" or "#time" in their commit messages, so it makes sense to display them as-is.

The other aspect is that Bitbucket Server at its core is a git repository hosting solution, and as such should display git repository data as-is, and that includes commit messages.

If you feel very strongly that this shouldn't be the case, feel free to raise a suggestion at https://jira.atlassian.com/secure/Dashboard.jspa via the Create button at the top.

Cheers,

Christian

Premier Support Engineer

Atlassian

martin.woods March 3, 2020

@Christian Glockner that makes perfect sense, thanks for the reply again 

 

Cheers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events