Re: [PATCH] add --remote option to git-clone.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] add --remote option to git-clone.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:52

Johannes Schindelin [off-list ref] writes:
On Fri, 2 Feb 2007, Michael S. Tsirkin wrote:
...
quoted
One can always get more branches later, is my approach.
Yes. But in the same vein, one can add _one_ branch to an empty repo 
either. So, with your reasoning, your patch wouldn't be needed to begin 
with.
Indeed.
But I find it useful. Even the version where you are not limited to one 
branch.
I am not against the general idea of tracking a subset of
branches, but issues include:

 [1] tracking multiple (but not all) branches, as you pointed out,

 [2] how this should interact with later fetches from the same
     remote.

 [3] allowing similar "track these branches from a new remote
     from now on" in an already initialized repository.

Perhaps by specifying the --branch parameter in an wildcard
fashion, remote.*.fetch can be initialized to that wildcard and
later new branches that match the wildcard pattern ca be fetched
(which is a strawman solution for [1] and [2]).  I suspect [3]
belongs to what "git remote" should allow you to do, but in that
case maybe "git init-db ; git remote *that-new-command*" would
be a single uniform way to solve all of the above?

I personally feel this is post 1.5.0 material.

Re: [PATCH] add --remote option to git-clone.

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:52

Hi,

On Thu, 1 Feb 2007, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
On Fri, 2 Feb 2007, Michael S. Tsirkin wrote:
...
quoted
One can always get more branches later, is my approach.
Yes. But in the same vein, one can add _one_ branch to an empty repo 
either. So, with your reasoning, your patch wouldn't be needed to begin 
with.
Indeed.
quoted
But I find it useful. Even the version where you are not limited to one 
branch.
I am not against the general idea of tracking a subset of
branches, but issues include:

[explains why git-remote is a better place for this]
Seeing your patch to git-remote, it feels more natural, too. Especially 
since that (or which? :-D) does not give the term "clone" a 
Microsoft'esque completely new meaning.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help