[RFC] Triangular Workflow: user friendly full implementation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[RFC] Triangular Workflow: user friendly full implementation

Jordan DE GEA-2
We are working on full implementation of triangular workflow feature.
For now, the main options available are:
         - branch.<name>.pushRemote
         - remote.pushDefault
And only setable by hands.

As it can be difficult to understand, here is what we want to do.


Context:
        - One main remote repository, e.g. git/git.
        - A remote fork (e.g. a GitHub fork) of git/git, e.g. me/git.
        - A local clone of me/git on the machine

Purposes:
        - the local branch master has to fetch to git/git by default
        - the local branch master has to push to me/git by default

Configuration wanted:
        - Add a remote to git/git e.g. `git remote add ...`
        - Set the fetch remote for branch as default.

For now, we can do that by setting:
        - branch.<name>.remote to git/git
        - branch.<name>.pushRemote to me/git
But many options set `branch.<name>.remote`, a suitable solution is to
implement an option for the fetch for example.


Here is what we want to implement:

1.
        a. add the config var: remote.fetchDefault
        b. add the config var: branch.<name>.fetchRemote
        c. add `git fetch --set-default` in order to set remote.fetchDefault
        d. add `git fetch --set-remote` in order to set branch.<name>.fetchRemote
        e. add `git pull --set-default` in order to set remote.fetchDefault
        f. add `git pull --set-remote` in order to set branch.<name>.fetchRemote

2.
        a. add `git push --set-default` in order to set remote.pushDefault
        b. add `git push --set-remote` in order to set branch.<name>.pushRemote


What's your opinion about this feature ?




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [RFC] Triangular Workflow: user friendly full implementation

Matthieu Moy-2
Jordan DE GEA <[hidden email]> writes:

> Here is what we want to implement:

Your message contains the word "implement" too many times. Before
thinking about implementation, think, and discuss, about the design.

If your message is intended to be a discussion on the design, then avoid
using "implementation" in the subject.

> 1.
> a. add the config var: remote.fetchDefault
> b. add the config var: branch.<name>.fetchRemote
> c. add `git fetch --set-default` in order to set remote.fetchDefault
> d. add `git fetch --set-remote` in order to set branch.<name>.fetchRemote
> e. add `git pull --set-default` in order to set remote.fetchDefault
> f. add `git pull --set-remote` in order to set branch.<name>.fetchRemote
>
> 2.
> a. add `git push --set-default` in order to set remote.pushDefault
> b. add `git push --set-remote` in order to set branch.<name>.pushRemote

This tells a lot about the "what?", but lacks the most important "why?"
(or "what for?") question.

The user doesn't want to "set configuration variables". He wants to work
with git, have commands do the right thing, avoid typing useless
keystrokes and avoid surprising behavior. Please explain how your
proposal would improve the situation. For example, show a typical
use-case with commands to type before and after your proposal is
implemented.

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [RFC] Triangular Workflow: user friendly full implementation

Junio C Hamano
In reply to this post by Jordan DE GEA-2
Jordan DE GEA <[hidden email]> writes:

> We are working on full implementation of triangular workflow feature.
> For now, the main options available are:
> - branch.<name>.pushRemote
> - remote.pushDefault
> And only setable by hands.

And once it is set, you do not have to worry about it.  I am not
sure per-branch thing is all that useful, unless you are always
working on a single branch like 'master', but the latter would be
just set once and forget about it.

> Context:
> - One main remote repository, e.g. git/git.
> - A remote fork (e.g. a GitHub fork) of git/git, e.g. me/git.
> - A local clone of me/git on the machine
> Purposes:
> - the local branch master has to fetch to git/git by default
> - the local branch master has to push to me/git by default

Wouldn't remote.pushDefault be the single thing you need to set just
once and forget about it?  Why would your users even want to do
these things ...

> c. add `git fetch --set-default` in order to set remote.fetchDefault
> d. add `git fetch --set-remote` in order to set branch.<name>.fetchRemote
> e. add `git pull --set-default` in order to set remote.fetchDefault
> f. add `git pull --set-remote` in order to set branch.<name>.fetchRemote
> a. add `git push --set-default` in order to set remote.pushDefault
> b. add `git push --set-remote` in order to set branch.<name>.pushRemote

... just to configure many variables every time they work on a new
branch?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Loading...