#836 Suggestion: auto-fast-forward option for forks
Closed: Won't Fix a year ago by wombelix. Opened 8 years ago by mikem.

The idea is this: when a primary repo is updated, all forks with the option enabled that can be fast-forwarded are (probably limited to matching name branches). Forked branches with custom changes would be ignored of course. This would help reduce the number of non-fastforward PRs, and would automate work that every fork owner now has to perform manually.

Just an idea.


I like the idea, I was more thinking of it in the way of trying to rebase when merging a PR but this is in the same vein.

The problem is that pygit2 doesn't support rebase and shelling out command to git seems just wrong. So for the time being, until pygit2 is improved or (more likely) we move to something else, it's not really doable.

I think I have also requested a rebase mechanism, but this one is definitely not a rebase. I'm only asking for forks that are in sync with the primary to remain in sync with the primary when the primary changes. If they have changes, we can skip them. This request is only asking for fast forwards when they are possible.

pseudocode (assuming primary repo branch just updated)

if not is_fast_forward(old, new):
  return
for f in forks:
  if not f.opts.auto_fast_forward:
    continue
  if is_fast_forward(f.refs.heads.$branch, new):
    f.do_fast_forward(f, $branch, new)

One of the main motivations for this is to reduce the complexity of maintaining sync for contributors.

Right now, a maintainer needs to manually sync the upstream branches to their fork. This can be somewhat tedious at times. It's easy to forget to do, and I have seen plenty of pull requests from folks who obviously have not done so in a while.

:thumbsup: I would love this feature!

The last update was 5 years ago, no further requests, updates or actionable tasks since then. Also it doesn't look like that pygit2 does support rebase in the meantime. I'm going to close this issue for now to reduce our backlog.

Metadata Update from @wombelix:
- Issue close_status updated to: Won't Fix
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata