git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jordan DE GEA <jordan.de-gea@grenoble-inp.org>
Cc: mhagger@alum.mit.edu, philipoakley@iee.org, git@vger.kernel.org,
	erwan.mathoniere@grenoble-inp.org, samuel.groot@grenoble-inp.org,
	tom.russello@grenoble-inp.org, Matthieu.Moy@grenoble-inp.fr,
	peff@peff.net, artagnon@gmail.com
Subject: Re: [PATCHv4] Documentation: triangular workflow
Date: Thu, 09 Jun 2016 10:02:17 -0700	[thread overview]
Message-ID: <xmqqmvmui9d2.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1465475708-1912-1-git-send-email-jordan.de-gea@grenoble-inp.org> (Jordan DE's message of "Thu, 9 Jun 2016 14:35:08 +0200")

Jordan DE GEA <jordan.de-gea@grenoble-inp.org> writes:

> +Motivations
> +~~~~~~~~~~~

> +* 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.


> +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.

  reply	other threads:[~2016-06-09 17:02 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 10:06 [RFC] Triangular Workflow: user friendly full implementation Jordan DE GEA
2016-05-26 11:04 ` Matthieu Moy
2016-05-26 18:30 ` Junio C Hamano
2016-05-30  8:46   ` [RFC] Triangular Workflow UI improvement Jordan DE GEA
2016-05-27  7:32 ` [RFC] Triangular Workflow: user friendly full implementation Philip Oakley
2016-05-30  9:07   ` [RFC] Triangular Workflow UI improvments Jordan DE GEA
2016-05-31 12:28     ` [RFC/PATCH] Triangular Workflow UI improvement: Documentation Jordan DE GEA
2016-05-31 14:33       ` Matthieu Moy
2016-06-01  9:32         ` Jordan DE GEA
2016-06-02 12:02         ` Michael Haggerty
2016-06-03  7:25       ` Philip Oakley
2016-06-03  9:52         ` Jordan DE GEA
2016-06-03 11:36           ` Matthieu Moy
2016-06-03 11:53             ` Jordan DE GEA
2016-06-05 21:28             ` Jordan DE GEA
2016-06-06  7:58               ` Matthieu Moy
2016-06-06 16:46                 ` Philip Oakley
2016-06-06 16:54                   ` Matthieu Moy
2016-06-06 19:21                     ` Philip Oakley
2016-06-07  7:03                       ` Matthieu Moy
2016-06-07 20:08                         ` Philip Oakley
2016-06-03 15:46         ` Junio C Hamano
2016-06-03 22:16           ` Philip Oakley
2016-06-06  9:48       ` [RFC/PATCHv2] Documentation: triangular workflow Jordan DE GEA
2016-06-06 19:23         ` Junio C Hamano
2016-06-06 22:21           ` Philip Oakley
2016-06-07  6:58             ` Matthieu Moy
2016-06-07  8:02               ` Jordan DE GEA
2016-06-07  8:38         ` [PATCHv3] " Jordan DE GEA
2016-06-07 19:12           ` Junio C Hamano
2016-06-08  8:37             ` Jordan DE GEA
2016-06-08 13:20             ` Matthieu Moy
2016-06-09 12:35           ` [PATCHv4] " Jordan DE GEA
2016-06-09 17:02             ` Junio C Hamano [this message]
2016-06-11 15:58               ` Ramkumar Ramachandra
2016-06-11 19:31                 ` Philip Oakley
2016-06-09 18:19             ` Philip Oakley
2016-06-10 16:47               ` Junio C Hamano
2016-06-11 19:25                 ` Philip Oakley
2016-06-13 18:35                   ` Junio C Hamano
2016-05-30  8:39 ` [RFC] Triangular Workflow UI improvement Jordan DE GEA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqmvmui9d2.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=artagnon@gmail.com \
    --cc=erwan.mathoniere@grenoble-inp.org \
    --cc=git@vger.kernel.org \
    --cc=jordan.de-gea@grenoble-inp.org \
    --cc=mhagger@alum.mit.edu \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.org \
    --cc=samuel.groot@grenoble-inp.org \
    --cc=tom.russello@grenoble-inp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).