For Bitbucket Server you can increase a setting causing only very similar files to be recognized as "copied" or "moved".
There is a similar config for Stash:
Stash probably detected it because it might be using something similar to:
$ git diff -C ...
You'll usually see that you've copied from a similar file if you've modified the file you are "copying" from within the same commit. You can usually still see it as a new file if you run git diff locally.
This is really frustrating for pull requests. When you're trying to view the new file, BitBucket thinks it's copied from another file just because all of our files start with the same header comment.
Oddly, if I limit the "Show diff of" to the commit where the file was added, it correctly detects it as a new file. But when I view "All changes in this pull request", the error occurs.
Would be nice to have a "mark as new file" or something like that.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events