Thread (59 messages) flat view 59 messages, 5 authors, 2021-06-01

Re: [PATCH v2 6/6] doc: push: explain default=simple correctly

From: Philip Oakley <hidden>
Date: 2021-06-01 19:39:18

On 01/06/2021 17:35, Felipe Contreras wrote:
Philip Oakley wrote:
quoted
On 01/06/2021 13:12, Felipe Contreras wrote:
quoted
So it's more like:

  centralized = ~decentralized
  triangular = ~two-way

A centralized workflow consists of a single repository where branches
are typically two-way, but not necessarily.

A decentralized workflow consists of multiple repositories where
branches are typically triangular, but not necessarily.

So the triangularity is per branch, not per repository, and same_repo
means a two-way branch, could be a centralized or decentralized
workflow.
My personal viewpoint is that triangular flow happens when you cannot
push to the repo you consider as upstream.
It's not about permissions. Even if I had permissions to push to git.git,
I wouldn't do so. I do have permission to push to some public projects, but I
instead send patches/pull requests like everyone else.
I had it that if you don't have permissions then you definitely need to
use a Triangular flow. Hence how I was presenting the view.
It's more about ownership. In my personal repositories I can push
whatever I want, but on shared repositories I have to be more careful.
True, there are social choices that are equivalent to a type of
'permission'.
quoted
Rather you typically have a publish/backup repo instead (semi-public,
semi-private - few are interested ;-).

That (can't push one way around the triangle) part of the flow is
separate from the distinction between patch flows and merge (Pull)
request flows.
I think it's not separate, that is the thing that makes a triangular
flow triangular: the flow of patches goes through a different repository,
and then they get picked and merged into the upstream one.
Pull requests can do the same thing, just as in Git-for Windows..
quoted
E.g. My personal Git repo can be triangular with both git.git and
git-for-windows, plus a few (what I view as) fetch-only repos from other
collaborators/maintainers beyond the triangular 'golden' upstream repo.

I often consider GitHub as a centraliser, but I don't think it's what is
being considered above.
GitHub is all about pull requests, you fork a repository, you push your
branch into that personal fork, and then you request a pull from
upstream.

That's triangular.
Yes.
quoted
--
A thought did come to mind that a Git serve/repo (typically bare) should
be able to offer a 'refs/users/*' space (c.f. refs/remotes used by
individual users) that allows a type of 'centralised' operation (almost
as if all the users used a common alternates repo). Users could only
push to their own /user refs, but could pull from the main refs/heads,
and their own refs/users/ space.

This would give flexibility to smaller corporate central operations to
offer 'triangular flow' where each dev would feel like they have their
own 'push' repo, when in reality it's really personalised branches. As
usual the authentication of user names being handed off elsewhere;-). It
could avoid some of the --alternate management aspects.

It's a thought..
Yeah, and interesting thought. But it demonstrates what I said above:
you can have a central repository, and yet have triangular branches:
I see triangular being about repos, rather than branches. The suggestion
about was, essentially, about managing multiple user forks on the same
server without using alternates etc. It's not fully thought through ;-)
 feature-1 <=  origin/master
            => origin/felipec/feature-1

Cheers.
I expect to be off-line for a week or so.

Philip
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help