BBS pull request documentation overlooks the handling of history rewriting.

The pull request actually handles commits removed by rebase nicely (e.g. a history cleanup as suggested in Simple Git workflow is simple). Evidently, information about the commits, even the full sources in the state they were in in the no-longer-existing commits, is stored in the database.

But I had to find this out by experient, rather than reading the fine documentation. Any ideas why?

1 answer

It's worth noting that (unless something has changed recently) we don't store commits in the database. Rebased commits aren't actually removed from Git immediately so our UI can still retrieve them. Git behaves this way to avoid users making unrecoverable errors too easily. The general progression towards being gone forever is that the old head is stored in something called a reflog, and will eventually be removed by a garbage collection randomly (I believe the default is sometime after 30 days).

Typically, your PRs will be fine, because you won't look at PRs from a month ago. And if you do, you hopefully don't care about commits you've rebased away so long ago. In case that happens, the UI will degrade gracefully, but won't be able to show you the details of the commits that were removed.

 

As for your actual question:

But I had to find this out by experient, rather than reading the fine documentation. Any ideas why?

We typically only try to document things that are surprising / non-intuitive and otherwise keep our documentation light to avoid too much noise. I guess handling of rebases is kinda a table stakes thing to us - we didn't expect it to be surprising for you that it would work. For my own education, it might be useful to understand what you expected to happen and what tool you were using previously to understand your expectations.

 

Cheers,

Adam

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

635 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot