gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Add merge style `fast-forward-only`

Open chrisnc opened this issue 1 year ago • 5 comments

With this option, it is possible to require a linear commit history with the following benefits over the next best option Rebase+fast-forward: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier.

Closes #24906

chrisnc avatar Jan 27 '24 09:01 chrisnc

I'm missing the localization for the new UI, but otherwise I think it's close? This is my first contribution so I'm sure I've missed some other things, too. Reviews appreciated!

chrisnc avatar Jan 27 '24 09:01 chrisnc

Oh, by the way: You don't need to force push your branch. We'll squash merge it anyway, so these other commits won't be added to the history, and force pushes make reviewing painful.

delvh avatar Jan 28 '24 23:01 delvh

~~Addressed the feedback so far, and the integration tests I added are passing. When I test this locally with a repository configured with only fast-forward-only merges allowed, I see the "This branch can be merged automatically" message for an outdated branch, which seems wrong, so I'll look into how to address that...~~ Looked into this, and there is already IsBlockedByOutdatedBranch which is controlled by a separate repository setting. I think it's okay to leave this as-is, but let me know if you disagree.

chrisnc avatar Jan 30 '24 05:01 chrisnc

the integration tests I added are passing

CI disagrees, and says the routes haven't been found.

delvh avatar Jan 30 '24 08:01 delvh

CI disagrees, and says the routes haven't been found.

Indeed. I ran make integrations.sqlite.test and it passed, but I guess it wasn't clear how to run them. Will fix the errors.

Update: fixed.

chrisnc avatar Jan 30 '24 16:01 chrisnc

I think this is ready to go other than translations. Should I make an attempt at those or is there some other process for doing that?

chrisnc avatar Feb 11 '24 19:02 chrisnc

Ah, forgot to approve. Sorry. No, they will be added automatically from Crowdin once the PR is merged.

delvh avatar Feb 11 '24 19:02 delvh

Automatically locked because of our CONTRIBUTING guidelines

github-actions[bot] avatar Mar 01 '24 00:03 github-actions[bot]