git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv4] Documentation: triangular workflow

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 9, 2016, 17:02 UTC
Message-ID
<xmqqmvmui9d2.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1465475708-1912-1-git-send-email-jordan.de-gea@grenoble-inp.org>
Jordan DE GEA <jordan.de-gea@grenoble-inp.org> writes:
> +Motivations
> +~~~~~~~~~~~
Show 5 quoted lines
> +* Allows contributors to work with Git even though they do not have
> +write access to **UPSTREAM**.
>
> +* Allows maintainers to receive code from contributors they may not
> +trust.

I somehow don't think "even though" sits well here. You can work with Git all you want locally even if you do not have write access anywhere, but that is stating the obvious. Also, unless the only alternative you are contrasting "triangular" with is "a single central repository workflow", "may not trust" is not a unique advantage of "triangular". You can exchange patches and reviews with contributors just like you do.

I think the more important thing to say instead of the above two is that this arrangement allows distributed workflow; you publish to your place at your own pace, they pull from you if and when they choose to, and they publish their result to their place at their own pace.

> +* Code review is more efficient

I have no idea what data you have to back this claim up. More efficient compared to what?

If you are contrasting "triangular" with "a single central repository everybody pushes into", then one big advantage "triangular" can have around "code review" is that it allows reviews before the code hits the authoritative history of the project. If your project works with a single central repository everybody pushes into, things tend to run in reverse--after you push questionable stuff into the project history, somebody else has to spot problems, go in and fix it after the fact.

> +* Encourages clean history by using `rebase -i` and `push --force` to 
> +your public fork before the code is merged
This is a side-effect of "review before merge" mentioned earlier.
Show 34 quoted lines
> +Preparation
> +~~~~~~~~~~~
> +
> +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, `git pull` can pull from
> +**UPSTREAM** without argument.
> +
> +For each branch requiring a triangular workflow, set
> +`branch.<branch>.remote` and `branch.<branch>.pushRemote`.
> +
> +Example with master as <branch>:
> +===================================
> +* `git config branch.master.remote upstream`
> +* `git config branch.master.pushRemote origin`
> +===================================

Wouldn't it be much simpler to manage if you instead start from a clone of **UPSTREAM** and then fork **PUBLISH** and push your work out to the latter? You do not have to do per-branch configuration that way, no? Instead you would set default.pushRemote to publish just once, and no matter how many branches you create later, you do not have to do anything special.

It smells like you are deliberately presenting a more cumbersome way, as a prelude to add even more configuration that is not necessary if you started in the right direction in the first place.

Previous: Jordan DE GEANext: Ramkumar Ramachandra
Message 34 of 41 in “[RFC] Triangular Workflow: user friendly full implementation”
  1. Jordan DE GEAMay 26, 2016
  2. Matthieu MoyMay 26, 2016
  3. Junio C HamanoMay 26, 2016
  4. [RFC] Triangular Workflow UI improvementJordan DE GEA, May 30, 2016
  5. Philip OakleyMay 27, 2016
  6. [RFC] Triangular Workflow UI improvmentsJordan DE GEA, May 30, 2016
  7. Triangular Workflow UI improvement: DocumentationJordan DE GEA, May 31, 2016
  8. Matthieu MoyMay 31, 2016
  9. Jordan DE GEAJun 1, 2016
  10. Michael HaggertyJun 2, 2016
  11. Philip OakleyJun 3, 2016
  12. Jordan DE GEAJun 3, 2016
  13. Matthieu MoyJun 3, 2016
  14. Jordan DE GEAJun 3, 2016
  15. Jordan DE GEAJun 5, 2016
  16. Matthieu MoyJun 6, 2016
  17. Philip OakleyJun 6, 2016
  18. Matthieu MoyJun 6, 2016
  19. Philip OakleyJun 6, 2016
  20. Matthieu MoyJun 7, 2016
  21. Philip OakleyJun 7, 2016
  22. Junio C HamanoJun 3, 2016
  23. Philip OakleyJun 3, 2016
  24. [RFC/PATCHv2] Documentation: triangular workflowJordan DE GEA, Jun 6, 2016
  25. Junio C HamanoJun 6, 2016
  26. Philip OakleyJun 6, 2016
  27. Matthieu MoyJun 7, 2016
  28. Jordan DE GEAJun 7, 2016
  29. [PATCHv3] Documentation: triangular workflowJordan DE GEA, Jun 7, 2016
  30. Junio C HamanoJun 7, 2016
  31. Jordan DE GEAJun 8, 2016
  32. Matthieu MoyJun 8, 2016
  33. [PATCHv4] Documentation: triangular workflowJordan DE GEA, Jun 9, 2016
  34. Junio C HamanoJun 9, 2016
  35. Ramkumar RamachandraJun 11, 2016
  36. Philip OakleyJun 11, 2016
  37. Philip OakleyJun 9, 2016
  38. Junio C HamanoJun 10, 2016
  39. Philip OakleyJun 11, 2016
  40. Junio C HamanoJun 13, 2016
  41. [RFC] Triangular Workflow UI improvementJordan DE GEA, May 30, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.