lakeFS icon indicating copy to clipboard operation
lakeFS copied to clipboard

Support fast-forward merges

Open johnnyaug opened this issue 3 years ago • 4 comments

When the destination of the merge has no changes (i.e. it no new commits since the feature branch was created) - allow to merge back by simply pointing the destination branch to the HEAD of the source branch - without creating a merge commit.

Decide which is the default behavior when the destination branch has no changes. The user should be able to trigger the non-default behavior using a flag. For example, Git has the --no-ff flag to force the creation of a merge commit.

johnnyaug avatar May 05 '22 16:05 johnnyaug

#3274 is also possibly relevant.

arielshaqed avatar May 05 '22 19:05 arielshaqed

This issue is now marked as stale after 90 days of inactivity, and will be closed soon. To keep it, mark it with the "no stale" label.

github-actions[bot] avatar Nov 01 '23 14:11 github-actions[bot]

Closing this issue because it has been stale for 7 days with no activity.

github-actions[bot] avatar Nov 11 '23 01:11 github-actions[bot]

Adding a potential use case for fast forward merges -

We have a files for a qa set stored in lakefs, with a .lakefs_ref.yaml file in our git repo referencing a specific branch and commit. Since anyone's changes could affect all the files, we want the main branch in lakefs to be fast-forward merge only, i.e. any other operation is likely an indication of an error.

The other advantage of this is we can now in a background process merge lakefs feature branch commits (checked into git main), back into lakefs main asynchronously. Since only fast forward merges are allowed we can be sure the commit hash is always the same.

Edit - Slack thread with full context here https://lakefs.slack.com/archives/C016726JLJW/p1727144259326919

Water292 avatar Sep 24 '24 22:09 Water292