Re: [RFD] making separate-remote layout easier to use

3 messages, 3 authors, 2016-08-11 · open the first message on its own page

Re: [RFD] making separate-remote layout easier to use

From: Junio C Hamano <hidden>
Date: 2016-08-11 19:22:07

Jakub Narebski [off-list ref] writes:
Junio C Hamano wrote:
quoted
Now separate-remote layout is the default for newly cloned
repositories, I think it is a good time to make further effort
to make things easier to use.  Here are some of the ideas off
the top of my head.
[...]
quoted
* Change the default contents of $GIT_DIR/remotes/origin
The question is: do we continue to use remotes/ file, or do we
save remotes info in the config file: remote.<name>.url,
remote.<name>.fetch, remote.<name>.push and branch.<name>.merge
(in our case '[remote "origin"]' section)?
It is not "the question"; it is irrelevant because
$GIT_DIR/remotes/origin and [remote "origin"] are pretty much
interchangeable, and will hopefully continue to be.

        [remote "origin"]
                url = master.kernel.org:/pub/scm/git/git.git/
                fetch = +refs/heads/master:refs/remotes/origin/master
                fetch = +refs/heads/*:refs/remotes/origin/*

would be the way to express the equilvalent of the example in
the previous message.


Re: [RFD] making separate-remote layout easier to use

From: Shawn Pearce <hidden>
Date: 2016-08-11 19:52:33

Junio C Hamano [off-list ref] wrote:
Jakub Narebski [off-list ref] writes:
quoted
The question is: do we continue to use remotes/ file, or do we
save remotes info in the config file: remote.<name>.url,
remote.<name>.fetch, remote.<name>.push and branch.<name>.merge
(in our case '[remote "origin"]' section)?
It is not "the question"; it is irrelevant because
$GIT_DIR/remotes/origin and [remote "origin"] are pretty much
interchangeable, and will hopefully continue to be.
I'm all for:

 * changing the default made git-clone to be [remote "<origin>"]
 * continuing to support parsing of $GIT_DIR/remotes/*

We moved away from the $GIT_DIR/branches directory to
$GIT_DIR/remotes, yet we still support $GIT_DIR/branches in
remote handling code.  I see no reason why we cannot start to use
remote.<name>.url by default while continuing to support the older
branches and remotes formats.

For one thing the newer remote.<name>.fetch seems to make more sense
to new users than Pull: lines do.  For another it appears to be
supported since v1.4.0, which was released June 10th.  Most users
cloning a repository with >1.4.4.1 will probably only use 1.4.0
or later on that same repository, so there is probably low risk of
breakage due to the remote not being recognized by a pre-1.4.0 Git.

-- 

Re: [RFD] making separate-remote layout easier to use

From: Jakub Narebski <hidden>
Date: 2016-08-11 20:19:47

Junio C Hamano wrote:
Jakub Narebski [off-list ref] writes:
quoted
Junio C Hamano wrote:
quoted
Now separate-remote layout is the default for newly cloned
repositories, I think it is a good time to make further effort
to make things easier to use.  Here are some of the ideas off
the top of my head.
[...]
quoted
* Change the default contents of $GIT_DIR/remotes/origin
The question is: do we continue to use remotes/ file, or do we
save remotes info in the config file: remote.<name>.url,
remote.<name>.fetch, remote.<name>.push and branch.<name>.merge
(in our case '[remote "origin"]' section)?
It is not "the question"; it is irrelevant because
$GIT_DIR/remotes/origin and [remote "origin"] are pretty much
interchangeable, and will hopefully continue to be.

        [remote "origin"]
                url = master.kernel.org:/pub/scm/git/git.git/
                fetch = +refs/heads/master:refs/remotes/origin/master
                fetch = +refs/heads/*:refs/remotes/origin/*

would be the way to express the equilvalent of the example in
the previous message.
Well, the question is if git-clone would generate appropriate config 
entries in addition to or instead of $GIT_DIR/remotes/origin file...

By the way, what do you think about extended refspec syntax, namely
in addition to <remote name>:<local name> it would allow to say
<remote name>:<local name>:<local branch to merge into>?
-- 
Jakub Narebski
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help