git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RFC] Use "git fetch" when cloning

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 21, 2007, 16:04 UTC
Message-ID
<Pine.LNX.4.64.0711211601540.27959@racer.site>
In-Reply-To
<1195659613-5290-1-git-send-email-sbejar@gmail.com>
Hi,
On Wed, 21 Nov 2007, Santi Béjar wrote:
> 1) It always use "git fetch" even if local. So now it checks the validity
>    of the new repo, in particular it does not create a broken repository
>    when there are too many nested alternates.

I doubt that this is a good change. It will make local clones much, much more expensive now.

Show 5 quoted lines
> 2) It connects with the remote repo when fetching the branches/tags
>    and the remote HEAD.
> 
> 3) The quiet mode of "git fetch" prints the changed branches/tags, so "git clone"
>    prints always the new branches/tags.

These changes would merit a split so that we could cherry-pick what we want, and leave what we don't want.

Show 15 quoted lines
> diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
> index 699df6e..9b7f638 100755
> --- a/t/t5710-info-alternate.sh
> +++ b/t/t5710-info-alternate.sh
> @@ -53,7 +53,7 @@ git prune'
>  
>  cd "$base_dir"
>  
> -test_expect_failure 'creating too deep nesting' \
> +test_expect_success 'creating too deep nesting' \
>  'git clone -l -s C D &&
>  git clone -l -s D E &&
>  git clone -l -s E F &&
> -- 
> 1.5.3.5.next.428.g67f5d-dirty
What on _earth_?

After thinking a bit harder about it, _and_ reading the commit message, I understand why it succeeds now.

But what would you _yourself_ think when reading this part of the code in half a year? Exactly.

Ciao, Dscho

Previous: Santi Béjar
Message 2 of 2 in “Use "git fetch" when cloning”
  1. Use "git fetch" when cloningSanti Béjar, Nov 21, 2007
  2. Johannes SchindelinNov 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.