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

Re: [PATCHv3] Documentation: triangular workflow

From
JGJordan DE GEA <jordan.de-gea@grenoble-inp.org>
Date
Jun 8, 2016, 08:37 UTC
Message-ID
<CDB4510C-64D4-4357-A175-18D9B5681BD2@grenoble-inp.org>
In-Reply-To
<xmqqr3c8q0d5.fsf@gitster.mtv.corp.google.com>
Show 12 quoted lines
> Le 7 juin 2016 à 21:12, Junio C Hamano <gitster@pobox.com> a écrit :
> 
> Jordan DE GEA <jordan.de-gea@grenoble-inp.org> writes:
> 
>> +
>> +- Taking the last version of the project by fetching (e.g.
>> +  **UPSTREAM**)
> 
> "by fetching (e.g. UPSTREAM)" does not finish the sentence nicely.
> 
> "... by fetching from **UPSTREAM**" would work better.  So would
> "Fetching the latest version from the project (e.g. UPSTREAM) ».
Ok. Changed for the next iteration. 
Show 7 quoted lines
>> +- Writing modifications and push them to a fork (e.g. **PUBLISH**)
>> +- Opening a pull request
>> +- Checking of changes by the maintainer and, merging them into the
>> +  **UPSTREAM** repository if accepted
> 
> You'd want to end these sentences with full-stop, by the way
> 
OK too. 
Show 30 quoted lines
>> +........................................
>> +------------------               -----------------
>> +| UPSTREAM       |  maintainer   | PUBLISH       |
>> +|  git/git       |- - - - - - - -|  me/remote    |
>> +------------------       ←       -----------------
>> +              \                     /
>> +               \                   /
>> +          fetch↓\                 /↑push
>> +                 \               /
>> +                  \             /
>> +                   -------------
>> +                   |   LOCAL   |
>> +                   -------------
>> +........................................
>> +
>> +Git options to use:
>> +~~~~~~~~~~~~~~~~~~~
>> + - `branch.<branch>.remote`
>> + - `branch.<branch>.pushRemote`
>> + - `remote.pushDefault`
>> + - `push.default`
>> +
>> +See linkgit:git-config[1].
> 
> The title says "options" but listed are configuration variables and
> the referred document is also about git-config.  Perhaps retitle it to
> 
> 	Useful configuration variables
>        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
Ok too. 
Show 17 quoted lines
> or something like that?
> 
> One thing after reading the above lines that immediately came to my
> mind was this:
> 
>    After listing these four and telling the reader to "See ...", is
>    there anything else the reader needs to learn from below?
> 
> It may make the result a lot more useful document if this gives an
> impression to the reader as if you are saying (you do not have to
> actually say it) "We will guide you how to set up your workflow in
> triangular way, and here are the key configuration variables you
> will end up using; don't worry about the details of them, we'll
> teach you all about them soon in the following paragraphs."
> 
> And I found that "See linkgit:git-config[1]" go directly against
> that line of narrative.
A link is already added at the end of the document. So I delete this one. 
Show 25 quoted lines
> 
>> +Push behaviour
>> +~~~~~~~~~~~~~~
>> + ...
>> +
>> +Case 2: LOCAL is a clone of **UPSTREAM**
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +'In this case, the remote named `origin` corresponds to **UPSTREAM**.'
>> +
>> +Adding **PUBLISH** remote:
>> +
>> +===================================
>> +* `git remote add publish <PUBLISH_url>`
>> +===================================
> 
> It may perhaps be only me, but these blind instructions puts me off,
> and what I find lacking is "Why should I do this?"  "What benefit do
> I get by doing this".  Start it perhaps like this?
> 
> 	Because you will be pushing into the publish repository
> 	often, instead of having to type its URL every time, you
> 	want a short name you can use to call it.
> 
> and then give that "remote add".
Ok. Similar text added for the next iteration. 
Show 16 quoted lines
>> +
>> +**Method 1: One option for all branches**
>> +
>> +Setting `remote.pushDefault` in order to push to **PUBLISH** without
>> +argument for push.
>> +
>> +===================================
>> +* `git config remote.pushDefault publish`
>> +===================================
> 
> This is not too bad, but I'd say
> 
> 	With the "remote add" above, you can say "git push publish"
> 	to push there, instead of saying its URL.  But you may want
> 	to be even lazier and say just "git push".  To do so:
> 
Ok too. Similar text added for the next iteration. 
Show 53 quoted lines
> As a document that is geared toward being a tutorial, I personally
> think it is better to stick to one arrangement rather than
> presenting case 1/2 as two equivalently valid arrangements and
> describe them to equal degree of detail.  Otherwise, after finishing
> reading Case 1 and immediately reading Case 2 heading, the reader
> would start wondering "Which one should I pick?  What are the pros
> and cons?".
> 
> A typical reader of this document would have an upstream in mind,
> perhaps a clone of it locally, and may or may not yet have a publish
> repository, so one valid choice could be to use Case 2.
> 
> Whichever one you choose, the description should not begin with
> "pushing".  A reader who is the target of this document (i.e. who
> owns the LOCAL and PUBLISH repository) begins by cloning and/or
> fetching, followed by working on her own change while staying up to
> date, and pushing is the last thing she does in the flow.
> 
> So I'd recommend reordering the description to
> 
>    * Introduction.  As a summary, here are the four configuration
>      variables you'll be using to make it easier to arrange.
> 
>    * "Preparation".  Clone from the upstream, create an empty
>      publish repository and set it as a secondary remote, with
>      pushdefault pointing at it.
> 
>    * "Staying up-to-date".  You do not have to describe "git fetch"
>      or "git pull" from the upstream aka origin with too much
>      detail, as having or not having a publish repository does not
>      change anything on this side.
> 
>    * "Making your work available".  You would want to reiterate the
>      fact that "git push" does not go to the upstream but to your
>      publishing place thanks to the earlier pushdefault
>      configuration.
> 
>    * "Alternatively...".  In this section, you could mention
>      possible other arrangements.  One could be to set pushdefault
>      for each and every branch (aka your Case 2/Method 2), which
>      shouldn't be necesssary because at the beginning of the
>      document we made it clear that we assume that the reader
>      cannot push to upstream--the normal place she would be pushing
>      is to her own publishing place, and configuring "usually all
>      of them go to my publishing place, but this one alone will go
>      someplace else" (1) is an advanced workflow element, and more
>      importantly (2) is not specific to triangular workflow.
> 
>      Another altenative arrangement worth mentioning may be your
>      Case 1, i.e. to point at your publish place and a secondary
>      "upstream" pointing at where your upstream publishes their
>      work.  You can describe what needs to be changed compared to
>      the above three sections.
Yes, that clearer like that. I reorganize and send a new patch. 
Previous: Junio C HamanoNext: Matthieu Moy
Message 31 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.