git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] Documentation about triangular workflow
@ 2017-11-17 16:07 Daniel Bensoussan
  2017-11-17 16:07 ` [PATCH 2/2] Triangular workflow Daniel Bensoussan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Daniel Bensoussan @ 2017-11-17 16:07 UTC (permalink / raw)
  To: git; +Cc: ALBERTIN TIMOTHEE 11514771

From: ALBERTIN TIMOTHEE 11514771 <timothee.albertin@etu.univ-lyon1.fr>

---
 Documentation/gitworkflows.txt | 215 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 215 insertions(+)

diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt
index 02569d061..3f1ddba82 100644
--- a/Documentation/gitworkflows.txt
+++ b/Documentation/gitworkflows.txt
@@ -464,6 +464,221 @@ in patches to figure out the merge base.  See linkgit:git-am[1] for
 other options.
 
 
+TRIANGULAR WORKFLOW
+-------------------
+
+Introduction
+~~~~~~~~~~~~
+
+In some projects, contributors cannot push directly to the project but
+have to suggest their commits to the maintainer (e.g. pull requests).
+For these projects, it's common to use what's called a *triangular
+workflow*:
+
+- The project maintainer publishes a repository, called **UPSTREAM** in
+this document, which is a read-only for contributors. They can clone and
+fetch from this repository.
+- Contributors publish their modifications by pushing to a repository,
+called **PUBLISH** in this document, and request a merge.
+- Opening a pull request
+- If the maintainer accepts the changes, he merges them into the
+  **UPSTREAM** repository.
+
+This workflow is commonly used on different platforms like BitBucket,
+GitHub or GitLab which provide a dedicated mechanism for requesting merges.
+
+........................................
+------------------               -----------------
+| UPSTREAM       |  maintainer   | PUBLISH       |
+|  git/git       |- - - - - - - -|  me/remote    |
+------------------      <-       -----------------
+              \                     /
+               \                   /
+        fetch | \                 / ^ push
+              v  \               /  |
+                  \             /
+                   -------------
+                   |   LOCAL   |
+                   -------------
+........................................
+
+Motivations
+~~~~~~~~~~~
+
+* Allows contributors to work with Git even if they don't have
+write access to **UPSTREAM**.
+
+Indeed, in a centralized workflow, a contributor without write access
+could write some code but could not send it by itself.  The contributor
+was forced to create a mail which shows the difference between the
+new and the old code, and then send it to a maintainer to commit
+and push it.  This isn't convenient at all, neither for the
+contributor, neither for the maintainer. With the triangular
+workflow, the contributors have the write access on **PUBLISH**
+so they don't have to pass upon maintainer(s).  And only the
+maintainer(s) can push from **PUBLISH** to **UPSTREAM**.
+This is called a distributed workflow (See "DISTRIBUTED WORKFLOWS"
+above).
+
+* Code review is made before integration.
+
+The goal of the triangular workflow is also that the rest of the
+community or the company can review the code before it's in production.
+Everyone can read on **PUBLISH** so everyone can review code
+before the maintainer(s) merge it to **UPSTREAM**.  It also means
+that, in a free software, anyone can propose code without danger
+for the stability of the software.
+
+* Encourages clean history by using `rebase -i` and `push --force` to
+the public fork before the code is merged.
+
+This is just a side-effect of the "review before merge" mentionned
+above but this is still a good point.
+
+
+
+Here are the configuration variables you will need to arrange your
+workflow.
+
+Preparation as a contributor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Cloning from **PUBLISH**, which is a fork of **UPSTREAM** or an empty
+repository.
+
+======================
+`git clone <PUBLISH_url>`
+======================
+
+Setting the behavior of push for the triangular workflow:
+
+===========================
+`git config push.default current`
+===========================
+
+Adding **UPSTREAM** remote:
+
+===================================
+`git remote add upstream <UPSTREAM_url>`
+===================================
+
+With the `remote add` above, using `git pull upstream` pulls there,
+instead of saying its URL. In addition, the `git pull` command
+(without argument) can be used to pull from **UPSTREAM**.
+
+For each branch requiring a triangular workflow, set
+`branch.<branch>.remote` and `branch.<branch>.pushRemote` to set up
+the **UPSTREAM** and **PUBLISH** repositories.
+
+Example with master as <branch>:
+===================================
+* `git config branch.master.remote upstream`
+* `git config branch.master.pushRemote origin`
+===================================
+
+Staying up-to-date
+~~~~~~~~~~~~~~~~~~
+
+Retrieve updates from **UPSTREAM** with `git pull` and send them to
+**PUBLISH** with `git push`.
+
+Making your work available
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The `git push` command sends commits to the **PUBLISH** repository and not to
+the **UPSTREAM** thanks to the configuration you did earlier with the
+`git config remote.pushdefault origin` command.
+
+When a contributor pushes something, the `git config push.default
+current` command can be used to specifies that the name of the
+**PUBLISH** branch is the same as the name of the **LOCAL** one.
+
+.Display the push remote's name:
+[caption="Recipe: "]
+
+=================================
+`git rev-parse --abbrev-ref @{push}`
+=================================
+
+The shorthand `<branch>@{push}` denotes the remote-tracking branch
+where the <branch> would be pushed to. If no <branch> is specified
+(`@{push}`), <branch> takes the value of the current branch.
+
+
+.Display the fetch remote's name:
+[caption="Recipe: "]
+
+===================================
+`git rev-parse --abbrev-ref @{upstream}`
+===================================
+
+The shorthand `<branch>@{upstream}` substitutes the upstream name of
+the branch. If no <branch> is specified (`@{upstream}`), <branch>
+takes the value of the current branch.
+
+.Display commits added to the current branch since last push:
+[caption="Recipe: "]
+
+===============
+`git log @{push}..`
+===============
+
+.Display commits added to a specific branch since last push:
+[caption="Recipe: "]
+
+============================
+`git log <branch_name>@{push}..`
+============================
+
+Alternatively
+~~~~~~~~~~~~~
+
+Cloning from **UPSTREAM**
+[caption="Recipe: "]
+
+In the preparation above, a clone from **PUBLISH** was used. Starting
+with a clone of **UPSTREAM** is possible too.
+
+Cloning from **UPSTREAM**
+
+======================
+`git clone <UPSTREAM_url>`
+======================
+
+Setting the behavior of push for the triangular workflow:
+
+===========================
+`git config push.default current`
+===========================
+
+Because modifications will be often pushed into the **PUBLISH** repository,
+instead of having to type its URL every time, a short name can be used
+to call it.
+
+Adding **PUBLISH** remote:
+
+===================================
+`git remote add publish <PUBLISH_url>`
+===================================
+
+With the `remote add` above, using `git push publish` pushes there,
+instead of saying its URL. In addition, `git push` can push to
+**PUBLISH** without argument.
+
+'Method 1: One option for all branches'
+
+===================================
+`git config remote.pushDefault publish`
+===================================
+
+'Method 2: Each branch its option'
+
+Example with master as <branch>:
+===================================
+`git config branch.master.pushRemote publish`
+===================================
+
+
 SEE ALSO
 --------
 linkgit:gittutorial[7],
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] Triangular workflow
  2017-11-17 16:07 [PATCH 1/2] Documentation about triangular workflow Daniel Bensoussan
@ 2017-11-17 16:07 ` Daniel Bensoussan
  2017-11-17 21:15   ` Martin Ågren
  2017-11-17 20:01 ` [PATCH 1/2] Documentation about triangular workflow Stefan Beller
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Daniel Bensoussan @ 2017-11-17 16:07 UTC (permalink / raw)
  To: git
  Cc: Daniel Bensoussan, Michael Haggerty, Jordan DE GEA, Matthieu Moy,
	Timothee Albertin, Nathan Payre

The documentation about triangular workflow was not clear enough.
So it couldn't be clear enough for someone else. That's why we decided to
change it. Some documentation about triangular workflow already exists.
However, it seems unfortunate that there is no documentation about it in Git.

Based-on-patch-by: Jordan DE GEA <jordan.de-gea@grenoble-inp.org>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jordan DE GEA <jordan.de-gea@grenoble-inp.org>
Signed-off-by: Matthieu Moy <matthieu.moy@univ-lyon1.fr>
Signed-off-by: Timothee Albertin <timothee.albertin@etu.univ-lyon1.fr>
Signed-off-by: Nathan Payre <nathan.payre@etu.univ-lyon1.fr>
Signed-off-by: Daniel Bensoussan <daniel.bensoussan--bohm@etu.univ-lyon1.fr>
---
 Documentation/gitworkflows.txt | 59 +++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 33 deletions(-)

diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt
index 3f1ddba82..4aea16bc0 100644
--- a/Documentation/gitworkflows.txt
+++ b/Documentation/gitworkflows.txt
@@ -490,7 +490,7 @@ GitHub or GitLab which provide a dedicated mechanism for requesting merges.
 ........................................
 ------------------               -----------------
 | UPSTREAM       |  maintainer   | PUBLISH       |
-|  git/git       |- - - - - - - -|  me/remote    |
+|                |- - - - - - - -|               |
 ------------------      <-       -----------------
               \                     /
                \                   /
@@ -515,7 +515,7 @@ new and the old code, and then send it to a maintainer to commit
 and push it.  This isn't convenient at all, neither for the
 contributor, neither for the maintainer. With the triangular
 workflow, the contributors have the write access on **PUBLISH**
-so they don't have to pass upon maintainer(s).  And only the
+so they don't need maintainer(s) approval to write code.  And only the
 maintainer(s) can push from **PUBLISH** to **UPSTREAM**.
 This is called a distributed workflow (See "DISTRIBUTED WORKFLOWS"
 above).
@@ -526,13 +526,13 @@ The goal of the triangular workflow is also that the rest of the
 community or the company can review the code before it's in production.
 Everyone can read on **PUBLISH** so everyone can review code
 before the maintainer(s) merge it to **UPSTREAM**.  It also means
-that, in a free software, anyone can propose code without danger
+that, in free software, anyone can propose code without danger
 for the stability of the software.
 
 * Encourages clean history by using `rebase -i` and `push --force` to
 the public fork before the code is merged.
 
-This is just a side-effect of the "review before merge" mentionned
+This is just a side-effect of the "review before merge" mentioned
 above but this is still a good point.
 
 
@@ -543,18 +543,20 @@ workflow.
 Preparation as a contributor
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Cloning from **PUBLISH**, which is a fork of **UPSTREAM** or an empty
-repository.
+Cloning from **UPSTREAM**.
 
 ======================
-`git clone <PUBLISH_url>`
+`git clone <UPSTREAM_url>`
 ======================
 
-Setting the behavior of push for the triangular workflow:
+If **PUBLISH** doesn't exist, a contributor can publish his own repository.
+**PUBLISH** contains modifications before integration.
 
-===========================
-`git config push.default current`
-===========================
+============================
+`git clone <UPSTREAM_url>`
+`git remote add **PUBLISH**`
+`git push`
+============================
 
 Adding **UPSTREAM** remote:
 
@@ -576,12 +578,6 @@ Example with master as <branch>:
 * `git config branch.master.pushRemote origin`
 ===================================
 
-Staying up-to-date
-~~~~~~~~~~~~~~~~~~
-
-Retrieve updates from **UPSTREAM** with `git pull` and send them to
-**PUBLISH** with `git push`.
-
 Making your work available
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -590,20 +586,19 @@ the **UPSTREAM** thanks to the configuration you did earlier with the
 `git config remote.pushdefault origin` command.
 
 When a contributor pushes something, the `git config push.default
-current` command can be used to specifies that the name of the
+current` command can be used to specify that the name of the
 **PUBLISH** branch is the same as the name of the **LOCAL** one.
 
-.Display the push remote's name:
+.Display the name of the push remote:
 [caption="Recipe: "]
 
-=================================
-`git rev-parse --abbrev-ref @{push}`
-=================================
-
 The shorthand `<branch>@{push}` denotes the remote-tracking branch
 where the <branch> would be pushed to. If no <branch> is specified
 (`@{push}`), <branch> takes the value of the current branch.
 
+=================================
+`git rev-parse --abbrev-ref @{push}`
+=================================
 
 .Display the fetch remote's name:
 [caption="Recipe: "]
@@ -630,6 +625,12 @@ takes the value of the current branch.
 `git log <branch_name>@{push}..`
 ============================
 
+Staying up-to-date
+~~~~~~~~~~~~~~~~~~
+
+Retrieve updates from **UPSTREAM** with `git pull` and send them to
+**PUBLISH** with `git push`.
+
 Alternatively
 ~~~~~~~~~~~~~
 
@@ -662,16 +663,8 @@ Adding **PUBLISH** remote:
 ===================================
 
 With the `remote add` above, using `git push publish` pushes there,
-instead of saying its URL. In addition, `git push` can push to
-**PUBLISH** without argument.
-
-'Method 1: One option for all branches'
-
-===================================
-`git config remote.pushDefault publish`
-===================================
-
-'Method 2: Each branch its option'
+instead of saying its URL. In addition, `git push` without argument
+pushes to **PUBLISH**.
 
 Example with master as <branch>:
 ===================================
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] Documentation about triangular workflow
  2017-11-17 16:07 [PATCH 1/2] Documentation about triangular workflow Daniel Bensoussan
  2017-11-17 16:07 ` [PATCH 2/2] Triangular workflow Daniel Bensoussan
@ 2017-11-17 20:01 ` Stefan Beller
  2017-11-17 21:11 ` Martin Ågren
  2017-11-18  1:33 ` Junio C Hamano
  3 siblings, 0 replies; 8+ messages in thread
From: Stefan Beller @ 2017-11-17 20:01 UTC (permalink / raw)
  To: Daniel Bensoussan; +Cc: git, ALBERTIN TIMOTHEE 11514771

Thanks for contributing to Git and making the documentation better!

On Fri, Nov 17, 2017 at 8:07 AM, Daniel Bensoussan
<danielbensoussanbohm@gmail.com> wrote:
> From: ALBERTIN TIMOTHEE 11514771 <timothee.albertin@etu.univ-lyon1.fr>

This is a place where you can describe why this change is awesome (and
hence the project is interested in including it.)

The Git projects requires your Sign-off (and by the differing author
and you as a sender, both of you)
See Documentation/SubmittingPatches or
https://developercertificate.org/ and if you can agree
to that add a line "Signed-off-by: name <email>" to the commit message
of the text.

>
> diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt
> index 02569d061..3f1ddba82 100644
> --- a/Documentation/gitworkflows.txt
> +++ b/Documentation/gitworkflows.txt
> @@ -464,6 +464,221 @@ in patches to figure out the merge base.  See linkgit:git-am[1] for
>  other options.
>
>
> +TRIANGULAR WORKFLOW
> +-------------------
> +
> +Introduction
> +~~~~~~~~~~~~
> +
> +In some projects, contributors cannot push directly to the project but
> +have to suggest their commits to the maintainer (e.g. pull requests).
> +For these projects, it's common to use what's called a *triangular
> +workflow*:
> +
> +- The project maintainer publishes a repository, called **UPSTREAM** in
> +this document, which is a read-only for contributors. They can clone and
> +fetch from this repository.
> +- Contributors publish their modifications by pushing to a repository,
> +called **PUBLISH** in this document, and request a merge.
> +- Opening a pull request
> +- If the maintainer accepts the changes, he merges them into the
> +  **UPSTREAM** repository.
> +
> +This workflow is commonly used on different platforms like BitBucket,
> +GitHub or GitLab which provide a dedicated mechanism for requesting merges.
> +
> +........................................
> +------------------               -----------------
> +| UPSTREAM       |  maintainer   | PUBLISH       |
> +|  git/git       |- - - - - - - -|  me/remote    |
> +------------------      <-       -----------------
> +              \                     /
> +               \                   /
> +        fetch | \                 / ^ push
> +              v  \               /  |
> +                  \             /
> +                   -------------
> +                   |   LOCAL   |
> +                   -------------
> +........................................

git/git as the upstream is a notable example which doesn't
use this triangular workflow, as most patches are accepted
via email, such that the PUBLISH remote may not exist when
contributing to git/git. (Though https://submitgit.herokuapp.com/
tries to emulate the triangular workflow for contributors)


> +This is just a side-effect of the "review before merge" mentionned
> +above but this is still a good point.

mentioned (typo)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] Documentation about triangular workflow
  2017-11-17 16:07 [PATCH 1/2] Documentation about triangular workflow Daniel Bensoussan
  2017-11-17 16:07 ` [PATCH 2/2] Triangular workflow Daniel Bensoussan
  2017-11-17 20:01 ` [PATCH 1/2] Documentation about triangular workflow Stefan Beller
@ 2017-11-17 21:11 ` Martin Ågren
  2017-11-22 15:13   ` ALBERTIN TIMOTHEE p1514771
  2017-11-18  1:33 ` Junio C Hamano
  3 siblings, 1 reply; 8+ messages in thread
From: Martin Ågren @ 2017-11-17 21:11 UTC (permalink / raw)
  To: Daniel Bensoussan; +Cc: Git Mailing List, ALBERTIN TIMOTHEE 11514771

On 17 November 2017 at 17:07, Daniel Bensoussan
<danielbensoussanbohm@gmail.com> wrote:
> +- If the maintainer accepts the changes, he merges them into the
> +  **UPSTREAM** repository.

Personally, I would prefer "they" and "their" over "he" and "his". I'm
not sure how universal this preference is, but see also 715a51bcaf (am:
counteract gender bias, 2016-07-08). I realize that "he" is already used
in this document...

> + ... The contributor
> +was forced to create a mail which shows the difference between the
> +new and the old code, and then send it to a maintainer to commit
> +and push it.  This isn't convenient at all, neither for the
> +contributor, neither for the maintainer.

"neither ... nor". That said, I find the tone of this paragraph a bit
value-loaded ("forced ... isn't convenient at all"). It does sort of
contradict or at least compare interestingly with how git.git itself is
maintained. ;-) Maybe this could be framed in a more neutral way?

> +The goal of the triangular workflow is also that the rest of the
> +community or the company can review the code before it's in production.
> +Everyone can read on **PUBLISH** so everyone can review code
> +before the maintainer(s) merge it to **UPSTREAM**.  It also means

I think you can drop the "(s)". Your example workflow could have a
single maintainer. In a multi-maintainer workflow, the workflow would
still be the same. So no need to cover all bases by sprinkling "(s)" on
the text. (IMHO.)

I'll follow up with some comments on patch 2/2...

Martin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] Triangular workflow
  2017-11-17 16:07 ` [PATCH 2/2] Triangular workflow Daniel Bensoussan
@ 2017-11-17 21:15   ` Martin Ågren
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Ågren @ 2017-11-17 21:15 UTC (permalink / raw)
  To: Daniel Bensoussan
  Cc: Git Mailing List, Daniel Bensoussan, Michael Haggerty,
	Jordan DE GEA, Matthieu Moy, Timothee Albertin, Nathan Payre

On 17 November 2017 at 17:07, Daniel Bensoussan
<danielbensoussanbohm@gmail.com> wrote:
> The documentation about triangular workflow was not clear enough.

I think you would be able to `git rebase -i` these two patches into a
single, perfect patch. ;-) Maybe in collaboration with Albertin?

> -===========================
> -`git config push.default current`
> -===========================
> +============================
> +`git clone <UPSTREAM_url>`
> +`git remote add **PUBLISH**`
> +`git push`
> +============================

This renders as a single line for me, including "**PUBLISH**". (I use
AsciiDoctor, does this look good with AsciiDoc, I wonder?)

I've never worked with triangular workflows. That means I can't judge
the correctness of this, but what I've read seems reasonable and
helpful. I dropped some comments along the way, I hope you'll find them
constructive.

Martin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] Documentation about triangular workflow
  2017-11-17 16:07 [PATCH 1/2] Documentation about triangular workflow Daniel Bensoussan
                   ` (2 preceding siblings ...)
  2017-11-17 21:11 ` Martin Ågren
@ 2017-11-18  1:33 ` Junio C Hamano
  2017-11-22 15:55   ` ALBERTIN TIMOTHEE p1514771
  3 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2017-11-18  1:33 UTC (permalink / raw)
  To: Daniel Bensoussan; +Cc: git, ALBERTIN TIMOTHEE 11514771

Daniel Bensoussan <danielbensoussanbohm@gmail.com> writes:

> +TRIANGULAR WORKFLOW
> +-------------------
> +
> +Introduction
> +~~~~~~~~~~~~
> +
> +In some projects, contributors cannot push directly to the project but
> +have to suggest their commits to the maintainer (e.g. pull requests).
> +For these projects, it's common to use what's called a *triangular
> +workflow*:
> + ...
> +Motivations
> +~~~~~~~~~~~
> +
> +* Allows contributors to work with Git even if they don't have
> +write access to **UPSTREAM**.
> +
> +Indeed, in a centralized workflow, a contributor without write access
> +could write some code but could not send it by itself.  The contributor
> +was forced to create a mail which shows the difference between the
> +new and the old code, and then send it to a maintainer to commit
> +and push it.  This isn't convenient at all, neither for the
> +contributor, neither for the maintainer. With the triangular
> +workflow, the contributors have the write access on **PUBLISH**
> +so they don't have to pass upon maintainer(s).  And only the
> +maintainer(s) can push from **PUBLISH** to **UPSTREAM**.
> +This is called a distributed workflow (See "DISTRIBUTED WORKFLOWS"
> +above).

I probably should not be judging if these additions to
gitworkflows.txt is a good idea in the first place without seeing
any explanation as to why this patch is here, but I think it misses
the place where "triangular" sits in a larger picture.

The workflow to contrast against to illustrate the motivation is a
centralized workflow, where everybody pushes their updates to a
single place.  It does have problems inherent to its structure
(e.g. "review before integration" is much harder, if possible), and
also has its merits (e.g. it is simpler to explain and reason
about).

If you want to wean a project off of the centralized model, you'd
need to use the "distributed workflow".  The workflow to review and
apply mailed patches in public, and the workflow to have the project
pull from many publish repositories individual contributor has, are
two that allows the project to go distributed.  These two are
complementary choices with pros and cons, and it is not like one is
an improvement of the other.  Projects like the kernel even uses
hybrid of the two---the patches are reviewed in public at central
places (i.e. subsystem mailing lists) in an e-mail form and go
through iterations getting polished, and the polished results are
collected by (sub)maintainers and sent upwards, either as a request
to pull from publish repositories maintained by (sub)maintainers, or
relayed again in e-mail form (the last mile being e-mail primarily
serves as a transport vehicle for changes proven to be good, not as
material to be further reviewed).

The reason why projects make these choices is because there are pros
and cons.  A large collection of changes is far easier to integrate
with one command (i.e. "git pull") and with a need to resolve merge
conflicts just once, than applying many small changes as e-mailed
patches, having to resolve many conflicts along the way.  In order
to ensure quality of the individual changes, however, the changes
need to be reviewed and polished, and the reality of the life is
that there are far fewer people who are qualified to adequately
review and help polishing the changes than those who make changes.
Asking reviewers to go to different repositories (whose number
scales with the number of contributors) and leave comments in the
webforms is much less efficient and more costly for the project
overall, than asking them to subscribe to relevant mailing lists
(whose number scales only with the number of areas of interest) and
conduct reviews there.  Other factors like "offline access" also
count when considering the two models as "choices".

As long as the document uses phrases like "forced to", "isn't
convenient at all", etc., it is clear that it starts from a wrong
premise, "one is an improvement over the other".



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] Documentation about triangular workflow
  2017-11-17 21:11 ` Martin Ågren
@ 2017-11-22 15:13   ` ALBERTIN TIMOTHEE p1514771
  0 siblings, 0 replies; 8+ messages in thread
From: ALBERTIN TIMOTHEE p1514771 @ 2017-11-22 15:13 UTC (permalink / raw)
  To: Martin Ågren
  Cc: Git Mailing List, danielbensoussanbohm@gmail.com,
	PAYRE NATHAN p1508475, MOY MATTHIEU


>On 17 November 2017 at 17:07, Daniel Bensoussan
><danielbensoussanbohm@gmail.com> wrote:
>> +- If the maintainer accepts the changes, he merges them into the
>> +  **UPSTREAM** repository.

>Personally, I would prefer "they" and "their" over "he" and "his". I'm
>not sure how universal this preference is, but see also 715a51bcaf (am:
>counteract gender bias, 2016-07-08). I realize that "he" is already used
>in this document...

This could be a good thing in order to be neutral.  We can change this in
the whole file.

>> + ... The contributor
>> +was forced to create a mail which shows the difference between the
>> +new and the old code, and then send it to a maintainer to commit
>> +and push it.  This isn't convenient at all, neither for the
>> +contributor, neither for the maintainer.

>"neither ... nor". That said, I find the tone of this paragraph a bit
>value-loaded ("forced ... isn't convenient at all"). It does sort of
>contradict or at least compare interestingly with how git.git itself is
>maintained. ;-) Maybe this could be framed in a more neutral way?

Junio C Hamano told us the same thing about the motivation
section, we'll change it the next patch.

>> +The goal of the triangular workflow is also that the rest of the
>> +community or the company can review the code before it's in production.
>> +Everyone can read on **PUBLISH** so everyone can review code
>> +before the maintainer(s) merge it to **UPSTREAM**.  It also means

>I think you can drop the "(s)". Your example workflow could have a
>single maintainer. In a multi-maintainer workflow, the workflow would
>still be the same. So no need to cover all bases by sprinkling "(s)" on
>the text. (IMHO.)

We'll fix that.


Thank you for your review.

Timothée Albertin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] Documentation about triangular workflow
  2017-11-18  1:33 ` Junio C Hamano
@ 2017-11-22 15:55   ` ALBERTIN TIMOTHEE p1514771
  0 siblings, 0 replies; 8+ messages in thread
From: ALBERTIN TIMOTHEE p1514771 @ 2017-11-22 15:55 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git@vger.kernel.org, danielbensoussanbohm@gmail.com,
	PAYRE NATHAN p1508475, MOY MATTHIEU



Daniel Bensoussan <danielbensoussanbohm@gmail.com> writes:

>> +TRIANGULAR WORKFLOW
>> +-------------------
>> +
>> +Introduction
>> +~~~~~~~~~~~~
>> +
>> +In some projects, contributors cannot push directly to the project but
>> +have to suggest their commits to the maintainer (e.g. pull requests).
>> +For these projects, it's common to use what's called a *triangular
>> +workflow*:
>> + ...
>> +Motivations
>> +~~~~~~~~~~~
>> +
>> +* Allows contributors to work with Git even if they don't have
>> +write access to **UPSTREAM**.
>> +
>> +Indeed, in a centralized workflow, a contributor without write access
>> +could write some code but could not send it by itself.  The contributor
>> +was forced to create a mail which shows the difference between the
>> +new and the old code, and then send it to a maintainer to commit
>> +and push it.  This isn't convenient at all, neither for the
>> +contributor, neither for the maintainer. With the triangular
>> +workflow, the contributors have the write access on **PUBLISH**
>> +so they don't have to pass upon maintainer(s).  And only the
>> +maintainer(s) can push from **PUBLISH** to **UPSTREAM**.
>> +This is called a distributed workflow (See "DISTRIBUTED WORKFLOWS"
>> +above).

>I probably should not be judging if these additions to
>gitworkflows.txt is a good idea in the first place without seeing
>any explanation as to why this patch is here, but I think it misses
>the place where "triangular" sits in a larger picture.

There already have been a discussion about this documentation:
https://public-inbox.org/git/E83A9439-54C8-4925-8EE3-6AEEDD9416F3@grenoble-inp.org/
We forgot to add it to the commit message, it will be in the next
commit message.

>The workflow to contrast against to illustrate the motivation is a
>centralized workflow, where everybody pushes their updates to a
>single place.  It does have problems inherent to its structure
>(e.g. "review before integration" is much harder, if possible), and
>also has its merits (e.g. it is simpler to explain and reason
>about).

>If you want to wean a project off of the centralized model, you'd
>need to use the "distributed workflow".  The workflow to review and
>apply mailed patches in public, and the workflow to have the project
>pull from many publish repositories individual contributor has, are
>two that allows the project to go distributed.  These two are
>complementary choices with pros and cons, and it is not like one is
>an improvement of the other.  Projects like the kernel even uses
>hybrid of the two---the patches are reviewed in public at central
>places (i.e. subsystem mailing lists) in an e-mail form and go
>through iterations getting polished, and the polished results are
>collected by (sub)maintainers and sent upwards, either as a request
>to pull from publish repositories maintained by (sub)maintainers, or
>relayed again in e-mail form (the last mile being e-mail primarily
>serves as a transport vehicle for changes proven to be good, not as
>material to be further reviewed).

>The reason why projects make these choices is because there are pros
>and cons.  A large collection of changes is far easier to integrate
>with one command (i.e. "git pull") and with a need to resolve merge
>conflicts just once, than applying many small changes as e-mailed
>patches, having to resolve many conflicts along the way.  In order
>to ensure quality of the individual changes, however, the changes
>need to be reviewed and polished, and the reality of the life is
>that there are far fewer people who are qualified to adequately
>review and help polishing the changes than those who make changes.
>Asking reviewers to go to different repositories (whose number
>scales with the number of contributors) and leave comments in the
>webforms is much less efficient and more costly for the project
>overall, than asking them to subscribe to relevant mailing lists
>(whose number scales only with the number of areas of interest) and
>conduct reviews there.  Other factors like "offline access" also
>count when considering the two models as "choices".

>As long as the document uses phrases like "forced to", "isn't
>convenient at all", etc., it is clear that it starts from a wrong
>premise, "one is an improvement over the other".

We will take this into account.
We didn't know there were hybrid workflows.

Thank you for your time

Timothée Albertin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-11-22 15:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17 16:07 [PATCH 1/2] Documentation about triangular workflow Daniel Bensoussan
2017-11-17 16:07 ` [PATCH 2/2] Triangular workflow Daniel Bensoussan
2017-11-17 21:15   ` Martin Ågren
2017-11-17 20:01 ` [PATCH 1/2] Documentation about triangular workflow Stefan Beller
2017-11-17 21:11 ` Martin Ågren
2017-11-22 15:13   ` ALBERTIN TIMOTHEE p1514771
2017-11-18  1:33 ` Junio C Hamano
2017-11-22 15:55   ` ALBERTIN TIMOTHEE p1514771

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).