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

Amended commits trashes pull request's comments

Erik L July 12, 2013
I had a commit that I wanted changed and did a amend git and force pushed that up. But when I went back to the pull request, the comments that were on that are now gone. Is this intended?

2 answers

1 accepted

1 vote
Answer accepted
ThomasA
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.
July 12, 2013

Hi Erik,

Did you just alter the commit message or the actual contents?

Updates to a file in a pull request can cause comments to disappear. We attempt to put the comments back on the correct line however this is not always possible for example when the line is removed from the file.

It is not possible for me to comment on whether this particular comment should have been drifted or not as I don't know the particulars.

The bitbucket team wrote a detailed description (see the "High Plains Drifter" section) of how they implemented comment drift which may help you understand how this issue is approached.

Lastly I am not clear is this a bitbucket pull request or a Stash pull request?

Regards,

Tom

0 votes
Ramon Gonzalez December 13, 2021

This is still a problem. As a general rule comments should not disappear in any case. If a line number is no longer relevant, then the comments must be attached to the file, without line context. 

PR comments are live discussions until declared closed by user. 

The current behavior is very annoying. Please fix this.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events