From patchwork Sun Jan 12 19:03:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 1221831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-517233-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=firstfloor.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=GH6DhgZt; dkim=pass (1024-bit key; unprotected) header.d=firstfloor.org header.i=@firstfloor.org header.a=rsa-sha256 header.s=mail header.b=UlkYYcYj; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47wmNx1J3Sz9s4Y for ; Mon, 13 Jan 2020 06:04:32 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; q=dns; s=default; b=KFl6nbdGw57Bd/Mb z9L3vzIC9kK2wsD7XV75y5Bh+f9y5T3nmPyKpGphNGyL33aQ8AqYI9uLyZodgp43 re9ZdUfIipsXeAxcTMZqcaACxCEs8eoQAnGP4T1dXu6d0/jOgUKTokxqlb0XpovM FLPsb6jbl95B9bE8BZSg9sgP+Fg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=default; bh=z/K3MCJnM0NjAGzNSruKtO XsW1k=; b=GH6DhgZtRq3j+FvIB2rhLqz0/gtKVLCt4XpuXzeLb8I7SxmxO7Qxyk gzLiEcbMvmEp2v4A+uq7yq5mP6ok8c8odN0xYYdwptJ6RW7AipP6Q22OqsgYvhVL RDqCmNt6GZEItN2RM6nfG+DRXUGBZMjN6qp7F7qZPMh1+9/v4W2RQ= Received: (qmail 21061 invoked by alias); 12 Jan 2020 19:04:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 21051 invoked by uid 89); 12 Jan 2020 19:04:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=clones, HContent-Transfer-Encoding:8bit X-HELO: one.firstfloor.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 12 Jan 2020 19:04:24 +0000 Received: from firstfloor.org (c-71-238-43-142.hsd1.or.comcast.net [71.238.43.142]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by one.firstfloor.org (Postfix) with ESMTPSA id C5E7F86710; Sun, 12 Jan 2020 20:04:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1578855861; bh=hK0bN0BYHvTgeOsUZiIcjWCLK60Na0srkZTkWhE15U4=; h=From:To:Cc:Subject:Date:From; b=UlkYYcYjU3+DDcpi0HquJsU0QGMyAWCg0hk5yghS7pdpQCDdSwV/4EDI61zxNgw+H n3MaT/CVjBaR1DqsSkMF6G7dzYe1Cn0A2TMDCyRtEv5aLaRwtfBOkAwh0KG/exXVKo PaX05WBgNINOHODhvKtN1w6dxICxz+BH78fnHbzU= Received: by firstfloor.org (Postfix, from userid 1000) id 0E0D4A65FA; Sun, 12 Jan 2020 11:04:20 -0800 (PST) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: Andi Kleen Subject: [PATCH] Document how to use --reference Date: Sun, 12 Jan 2020 11:03:29 -0800 Message-Id: <20200112190328.17906-1-andi@firstfloor.org> MIME-Version: 1.0 From: Andi Kleen By popular demand, I did some updates to the git documentation how to use --reference to save disk space. Also recommend https instead of http (even though both are currently broken) --- htdocs/git.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/git.html b/htdocs/git.html index 0166ff74..41e2d953 100644 --- a/htdocs/git.html +++ b/htdocs/git.html @@ -43,9 +43,18 @@ check out the GCC sources using the following command:

If you are behind a firewall that does not allow the git protocol -through, you can replace git:// with http://. -You should only use the http protocol if -the git protocol does not work; the http protocol has a higher server +through, you can replace git:// with https://. + +

When doing multiple clones to different repositories you can avoid +redownloading the whole repository by using --reference. +For example +

git clone --reference original-gcc ssh://gcc.gnu.org/git.gcc.git new-gcc
+This will also save some disk space. Git will do this automatically when cloning from a local repository on the same file system. It is also possible to do a +shallow checkout with --depth to limit history, but that might limit your +ability to work with existing branches. + +You should only use the https protocol if +the git protocol does not work; the https protocol has a higher server overhead associated with it and will be slower.