Skip to content

Commit

Permalink
Add blog post for non-divergent dist-git branches
Browse files Browse the repository at this point in the history
Co-authored-by: Laura Barcziová <[email protected]>

Co-authored-by: Matej Focko <[email protected]>
  • Loading branch information
majamassarini and mfocko committed Oct 28, 2024
1 parent 9bd9711 commit 7dd27f4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/fedora-releases-guide/dist-git-onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ and not from `upstream_project_url`.
You can check the other customization options [here](./index.md#customization).

:::info Divergent dist-git branches
By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md).
By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the configuration details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md).
:::


Expand Down
2 changes: 1 addition & 1 deletion docs/fedora-releases-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ you should specify the [`upstream_tag_template`](/docs/configuration/#upstream_t
via [`files_to_sync`](/docs/configuration/#files_to_sync) configuration key.
- By default, Packit downloads sources defined in the spec file that contain URLs.
You can override these URLs via [`sources`](/docs/configuration#sources) configuration key.
- By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md).
- By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the configuration details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md).


##### Actions - use your own commands/scripts
Expand Down
5 changes: 3 additions & 2 deletions docs/fedora-releases-guide/non-divergent-dist-git-branches.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: non-divergent dist-git branches
title: Non-divergent dist-git branches
sidebar_position: 7
---

# non-divergent dist-git branches
# Non-divergent dist-git branches

To prevent your dist-git branches from diverging, you can use the following `dist_git_branches` syntax:

Expand Down Expand Up @@ -32,6 +32,7 @@ git merge f41
You shouldn't encounter any conflicts. However, if you have a conflict in the `.gitignore` file, it is safe to keep changes from both `rawhide` and the incoming branch. If you have a conflict in the changelog section of the specfile, ensure you **merge all the missing changelogs** into `rawhide` and list them **in the correct order** (newest changelogs first). Once `rawhide` is ready, you can proceed with:

```
# [TODO] Adjust the releases, if needed.
git checkout f39; git merge --ff-only rawhide
git checkout f40; git merge --ff-only rawhide
git checkout f41; git merge --ff-only rawhide
Expand Down
29 changes: 29 additions & 0 deletions posts/non-divergent-dist-git-branches/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "No more divergent dist-git branches with Packit!"
date: 2024-10-28T10:46:18+00:00
authors: mmassari
tags:
- propose-downstream
- pull-from-upstream
- downstream
- configuration
---

Were you annoyed by Packit creating divergent branches in your package's dist-git repository? You'll be happy to know that Packit now supports a new `dist_git_branches` syntax that enables fast-forwarding commits between branches.

<!--truncate-->

## What's New

When defining a `propose-downstream` or `pull-from-upstream` job, you can use the new `dist_git_branches` syntax.

```
dist_git_branches:
rawhide:
fast_forward_merge_into: [fedora-branched]
epel-9: {}
```

In this example, Packit runs the downstream synchronization process for the `rawhide` and `epel-9` branches as usual. Additionally, Packit opens a new pull request, reusing the commit from `rawhide`, for every `fedora-branched` branch, allowing it to be fast-forwarded when merging.

Do you want to know more? Look at the [non-divergent dist-git branches guide](/docs/fedora-releases-guide/non-divergent-dist-git-branches)

0 comments on commit 7dd27f4

Please sign in to comment.