git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [RFC/PATCH] clone: make 'git clone -c remote.origin.fetch=<refspec>' work
Date: Mon, 07 Mar 2016 16:19:31 +0100	[thread overview]
Message-ID: <20160307161931.Horde.TcdEVtHKgSMvScCDUKLclVq@webmail.informatik.kit.edu> (raw)
In-Reply-To: <xmqqfuw3rrwb.fsf@gitster.mtv.corp.google.com>


Quoting Junio C Hamano <gitster@pobox.com>:

> SZEDER Gábor <szeder@ira.uka.de> writes:
>
>> Check whether there are any relevant configured fetch refspecs and
>> take those into account during the initial fetch, unless running 'git
>> clone --single-branch'.
>>
>> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
>> ---
>
> Even though I think the original description did not mean to include
> the fetch refspecs when it talked about configuration taking effect,
> I think what this change wants to do probably makes sense.

Well, currently one would have to clone, set additional fetch refspecs,
fetch again and repack.  Using 'git clone -c <refspecs>' would do it in
a single step, requiring fewer commands, less time, less data transfer
and less disk space, which fits the justification of v1.7.7-rc0~90^2
perfectly.

Or init, add remote, set additional refspecs and fetch, which still
requires more commands, but at least doesn't transfer more data.

>> I'm unsure what to do with the '-c <fetch-refspec> --single-branch'
>> combination: it doesn't really make sense to me and can't imagaine a
>> use case where it would be useful...  but perhaps I just lack
>> imagination on this Sunday night.  Hence the RFC.
>
> My knee-jerk reaction is to change the last paragraph of your log
> message to read more like
>
> 	Always read the fetch refspecs from the newly created config
> 	file, and use that for the initial fetching.
>
> and do so even when running with "--single-branch".

Ok, will change the '--single-branch' codepath as well.

But before doing so, to avoid a possible misunderstanding on my part:
I'm not sure how literally you meant that "from the newly created
config file" part, because it ignores refspecs specified via any
other means, e.g. 'git -c <fetch-refspec> clone'.  I think the
initial fetch should be no different from "regular" fetches, and
should respect all configured fetch refspecs regardless where they
come from.

  reply	other threads:[~2016-03-07 15:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  1:11 [RFC/PATCH] clone: make 'git clone -c remote.origin.fetch=<refspec>' work SZEDER Gábor
2016-03-07  1:36 ` Junio C Hamano
2016-03-07 15:19   ` SZEDER Gábor [this message]
2016-03-07 15:33     ` Jeff King
2016-03-07 20:01       ` Junio C Hamano
2016-03-30 14:53       ` [PATCH v2] clone: respect configured fetch respecs during initial fetch SZEDER Gábor
2016-03-31 16:15         ` Junio C Hamano
2016-03-31 18:56           ` Junio C Hamano
2016-03-31 20:50             ` SZEDER Gábor
2016-03-31 22:44               ` Junio C Hamano
2016-04-01  4:20                 ` SZEDER Gábor
2016-04-01  0:30           ` SZEDER Gábor

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=20160307161931.Horde.TcdEVtHKgSMvScCDUKLclVq@webmail.informatik.kit.edu \
    --to=szeder@ira.uka.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).