From patchwork Mon Mar 18 16:14:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10857991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 814006C2 for ; Mon, 18 Mar 2019 16:15:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68C1829080 for ; Mon, 18 Mar 2019 16:15:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C51B2909C; Mon, 18 Mar 2019 16:15:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0740B29080 for ; Mon, 18 Mar 2019 16:15:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727603AbfCRQPU (ORCPT ); Mon, 18 Mar 2019 12:15:20 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34030 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726914AbfCRQPT (ORCPT ); Mon, 18 Mar 2019 12:15:19 -0400 Received: by mail-wr1-f68.google.com with SMTP id k1so17268129wre.1 for ; Mon, 18 Mar 2019 09:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YSf9p0wnG9SD9rIAiaQUadLh5xdeaOQHCnci9LKfWSA=; b=o1Rpq/NDe7ICYMzoNUW0lTJd0tj7nfd8uZsN96o1H9DGj8Zt16tBpjSjcBelJVGsJY gBMVvpPmS0RzbMvj2hnHZo6XucuHVlJmvvNNmWDQto3v6dLd6NHqeyav0utPvqUGyL69 Huqa90pgds50kZdifD3qXsS578d59tnBmZjXShRtaKPOrYGO8PGkl+SqIb1z2IPnoIhe 9bK+zsCRvRxJoaVxFI1664DImCKkUsUY4//nqdRkKle+WHtviql3nTXeR4XxlFZIKUPm +LyoV0ka/Ep40KWAS5isd0WyIn8kYRsrwVSreOFuuYCeAwBqING/EKlRqtg6yBLx1s+l V60w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YSf9p0wnG9SD9rIAiaQUadLh5xdeaOQHCnci9LKfWSA=; b=f+sOjAaXfNMNHyaU2auP8CfD6Htq3mZbgmTyW62AWClEgJdzijPIWoEwWafUKNKoQt BmQSindF8VRvOjGhWTZ8htvRlq7y8G/+zWKhWxJX1DBIrk/wWaatBusKOe0QOwn+SJTC bKzfTYNTHodNJzZ2r7mMOahr0YjQv0vUC63apiXwG+yRB2GO3+Uae3B9YSjbBReQVkVk NtSANrwgSxSbBLjYyrwbF/3FUd71c0obv59513354aeWSwlNCOGfdt02cmJ/vCkKsd3Y cXVN/sdtviDtXk6YhOcM73zkrqspKMGek+6NyaPhBIL5V1eZ2olNhzza6van7ZUO1sIh gBjQ== X-Gm-Message-State: APjAAAVCJJIDJmr1O36qjh9if48cO+NrAj1uynI9TN6ENnionAMoqN5P ERU542WLgRA3xynRAonJIC+umz3SBfo= X-Google-Smtp-Source: APXvYqyvHsFTO41PgzmqgMpP16QRyLyQHDl81isOR7UrWsDFVRKNuTp2B4wUK8JkZ6ZwXf4jVpGmkQ== X-Received: by 2002:adf:eac6:: with SMTP id o6mr12301618wrn.77.1552925717599; Mon, 18 Mar 2019 09:15:17 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z9sm3269728wmf.12.2019.03.18.09.15.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 18 Mar 2019 09:15:16 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= Subject: [PATCH 1/4] gc docs: modernize the advice for manually running "gc" Date: Mon, 18 Mar 2019 17:14:59 +0100 Message-Id: <20190318161502.7979-2-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The docs have been recommending that users need to run this manually, but that hasn't been needed in practice for a long time. Let's instead have this reflect reality and say that most users don't need to run this manually at all. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-gc.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index a7c1b0f60ed..cc82971022e 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -20,13 +20,17 @@ created from prior invocations of 'git add', packing refs, pruning reflog, rerere metadata or stale working trees. May also update ancillary indexes such as the commit-graph. -Users are encouraged to run this task on a regular basis within -each repository to maintain good disk space utilization and good -operating performance. +Most users should not have to run this command manually. When common +porcelain operations that create objects are run, such as +linkgit:git-commit[1] and linkgit:git-fetch[1], `git gc --auto` will +be run automatically. -Some git commands may automatically run 'git gc'; see the `--auto` flag -below for details. If you know what you're doing and all you want is to -disable this behavior permanently without further considerations, just do: +You should only need to run `git gc` manually when adding objects to a +repository without regularly running such porcelain commands. Another +use-case is wanting to do a one-off repository optimization. + +If you know what you're doing and all you want is to disable automatic +runs, do: ---------------------- $ git config --global gc.auto 0 From patchwork Mon Mar 18 16:15:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10857993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8D0113B5 for ; Mon, 18 Mar 2019 16:15:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF5D929080 for ; Mon, 18 Mar 2019 16:15:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B35B22909C; Mon, 18 Mar 2019 16:15:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2501D29080 for ; Mon, 18 Mar 2019 16:15:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727672AbfCRQPW (ORCPT ); Mon, 18 Mar 2019 12:15:22 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:33435 "EHLO mail-wr1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727597AbfCRQPV (ORCPT ); Mon, 18 Mar 2019 12:15:21 -0400 Received: by mail-wr1-f50.google.com with SMTP id q1so2067085wrp.0 for ; Mon, 18 Mar 2019 09:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xBSbKDrcPVlYZOKxqoQURKFY4gVAMC3st+vmY0zSaKU=; b=CePlTLpYHcxgXNUGaI9yIMiTTbWZyRHCJy3TG4bezHKDkjkzFZSWoVHdfNylrySGX+ GWZAJihh1Wcfuv/kHE7UFs82wrzwvu0UbzZY+eHL354OEFvyve5lTplg+QKB6p28mFDU 3q4eO6oOpTFVapsU7yAKP31amhypJdPXNRRJtqWVy4DyIONXSd3HGstTPca0s22fD41e D9b++Qw5ZO1AWeVlXPd1xnUpAzpSQ+zjy4ePCRMesGfxA4/IRhZMFf2TO2lf/ZPtYNbh wzOy0AUPrAsJzoJHYanhnp0VMB2VUDGCFdEKxZb+0pzny6YPtkwPq8zjfXnCD8X53gm9 Eh0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xBSbKDrcPVlYZOKxqoQURKFY4gVAMC3st+vmY0zSaKU=; b=gzd14VaulZhy7qEOqmdq1zREhFbkmlCmVXrW4gvBTCfI2Fh3WRNXTFQ1L+TZ60jb2h TOOjOKmJXBPJ3Z9qn2eRi3fdC1VVbX3Qf5YbA1pNZsF8KRPxi2iPjhEcGOeZrgzgo1tT KDWR2dA8QnwrHBGT7UeeRh+FMjzznSFIxuAZXNqA3k5JJZAAjOhIqlPscY8Gwglf5Lpn rsbGmFKQD93DzEaGJEROW056e/qbdvCNLKp77FuybKJpWKIl1zTMSYPopyr0ZXkNDXuS 3JQxsLcGY7vccS0MMYWtmllbSz0xXkpgZmJzHr5idSXlfYD33SRTf8+LZjPO868XBEVi mx8w== X-Gm-Message-State: APjAAAV/q4zQ+bGu6YPhgTdqfpC8iRprixtzZvAog8vWwK9422+OtI+q SC+d+bqh8lw+gs6xeTvR9PWhUrVZcx8= X-Google-Smtp-Source: APXvYqxE7yfdMoO9FIctWpHR4ZqYVY7B6Mhbg1sfDFjnLL/Pv8D8fkJv2J9+TQMp/vsfvav/UjJQTA== X-Received: by 2002:a5d:464e:: with SMTP id j14mr13586625wrs.109.1552925718733; Mon, 18 Mar 2019 09:15:18 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z9sm3269728wmf.12.2019.03.18.09.15.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 18 Mar 2019 09:15:17 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= Subject: [PATCH 2/4] gc docs: include the "gc.*" section from "config" in "gc" Date: Mon, 18 Mar 2019 17:15:00 +0100 Message-Id: <20190318161502.7979-3-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rather than duplicating the documentation for the various "gc" options let's include the "gc" docs from git-config. They were mostly better already, and now we don't have the same docs in two places with subtly different wording. In the cases where the git-gc(1) docs were saying something the "gc" docs in git-config(1) didn't cover move the relevant section over to the git-config(1) docs. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config/gc.txt | 12 +++++++ Documentation/git-gc.txt | 65 +++---------------------------------- 2 files changed, 16 insertions(+), 61 deletions(-) diff --git a/Documentation/config/gc.txt b/Documentation/config/gc.txt index c6fbb8a96f9..a834a801cd6 100644 --- a/Documentation/config/gc.txt +++ b/Documentation/config/gc.txt @@ -2,11 +2,17 @@ gc.aggressiveDepth:: The depth parameter used in the delta compression algorithm used by 'git gc --aggressive'. This defaults to 50. ++ +See the documentation for the `--depth` option in +linkgit:git-repack[1] for more details. gc.aggressiveWindow:: The window size parameter used in the delta compression algorithm used by 'git gc --aggressive'. This defaults to 250. ++ +See the documentation for the `--window` option in +linkgit:git-repack[1] for more details. gc.auto:: When there are approximately more than this many loose @@ -94,6 +100,12 @@ gc..reflogExpireUnreachable:: With "" (e.g. "refs/stash") in the middle, the setting applies only to the refs that match the . ++ +These types of entries are generally created as a result of using `git +commit --amend` or `git rebase` and are the commits prior to the amend +or rebase occurring. Since these changes are not part of the current +project history most users will want to expire them sooner, which is +why the default is more aggressive than `gc.reflogExpire`. gc.rerereResolved:: Records of conflicted merge you resolved earlier are diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index cc82971022e..9edf4e465b4 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -29,8 +29,7 @@ You should only need to run `git gc` manually when adding objects to a repository without regularly running such porcelain commands. Another use-case is wanting to do a one-off repository optimization. -If you know what you're doing and all you want is to disable automatic -runs, do: +If you know what you're doing and want to disable automatic runs, do: ---------------------- $ git config --global gc.auto 0 @@ -103,66 +102,10 @@ be performed as well. CONFIGURATION ------------- -The optional configuration variable `gc.reflogExpire` can be -set to indicate how long historical entries within each branch's -reflog should remain available in this repository. The setting is -expressed as a length of time, for example '90 days' or '3 months'. -It defaults to '90 days'. - -The optional configuration variable `gc.reflogExpireUnreachable` -can be set to indicate how long historical reflog entries which -are not part of the current branch should remain available in -this repository. These types of entries are generally created as -a result of using `git commit --amend` or `git rebase` and are the -commits prior to the amend or rebase occurring. Since these changes -are not part of the current project most users will want to expire -them sooner. This option defaults to '30 days'. - -The above two configuration variables can be given to a pattern. For -example, this sets non-default expiry values only to remote-tracking -branches: - ------------- -[gc "refs/remotes/*"] - reflogExpire = never - reflogExpireUnreachable = 3 days ------------- - -The optional configuration variable `gc.rerereResolved` indicates -how long records of conflicted merge you resolved earlier are -kept. This defaults to 60 days. - -The optional configuration variable `gc.rerereUnresolved` indicates -how long records of conflicted merge you have not resolved are -kept. This defaults to 15 days. - -The optional configuration variable `gc.packRefs` determines if -'git gc' runs 'git pack-refs'. This can be set to "notbare" to enable -it within all non-bare repos or it can be set to a boolean value. -This defaults to true. - -The optional configuration variable `gc.writeCommitGraph` determines if -'git gc' should run 'git commit-graph write'. This can be set to a -boolean value. This defaults to false. - -The optional configuration variable `gc.aggressiveWindow` controls how -much time is spent optimizing the delta compression of the objects in -the repository when the --aggressive option is specified. The larger -the value, the more time is spent optimizing the delta compression. See -the documentation for the --window option in linkgit:git-repack[1] for -more details. This defaults to 250. - -Similarly, the optional configuration variable `gc.aggressiveDepth` -controls --depth option in linkgit:git-repack[1]. This defaults to 50. - -The optional configuration variable `gc.pruneExpire` controls how old -the unreferenced loose objects have to be before they are pruned. The -default is "2 weeks ago". - -Optional configuration variable `gc.worktreePruneExpire` controls how -old a stale working tree should be before `git worktree prune` deletes -it. Default is "3 months ago". +The below documentation is the same as what's found in +linkgit:git-config[1]: +include::config/gc.txt[] NOTES ----- From patchwork Mon Mar 18 16:15:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10857995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6749813B5 for ; Mon, 18 Mar 2019 16:15:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C70929080 for ; Mon, 18 Mar 2019 16:15:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 405872909C; Mon, 18 Mar 2019 16:15:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA36729080 for ; Mon, 18 Mar 2019 16:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbfCRQPX (ORCPT ); Mon, 18 Mar 2019 12:15:23 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54029 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726914AbfCRQPW (ORCPT ); Mon, 18 Mar 2019 12:15:22 -0400 Received: by mail-wm1-f65.google.com with SMTP id e74so13606398wmg.3 for ; Mon, 18 Mar 2019 09:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6J0bm9qt+NMJmfG62ylVW6hUjWAnBLYsD9/T5zi/N34=; b=kXkd2y71Vv01oa7RhC8cpZJYpEGfehbLInH/CEfZbdaiarhrK5h6cJBMzZi+7n0F7L +1fYU5QvvZCDX/dz6ZBId5Nla6hbOWR5P0IkJjNMyLYhe7hVvggSurZ+4a74dLrOWPV5 xaK78G1oSw1ZF5qdimmvBl2B0LziLlGCCsRvET/d7xD8Nac1nDD9DXf9+dSc+w041Vbu 1h4NFhT1ADZdGKyKgqL334Qoc7RHnXFWm/7S65WD7X/d493a5sG3iVImLAYswDycK47c 4GqqQziY5reVaRrSHC38hIRiTtyq+a+/SL5OzJoVuHIcByGy4f455jGN50UmSHjT8jUZ 1nUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6J0bm9qt+NMJmfG62ylVW6hUjWAnBLYsD9/T5zi/N34=; b=uhv9fxYIn8UgOP5yIS51whlalnuD517ne9EB85Q2kj7zZvKVypduPw9RGa95ciYKFT Er68gefDaIzKFxR8i4qUAZDdc1LFn7fGEDpvW+NRtS2knrO1FHesevW6y6d14m+AHpQO TZZf5DU+F8mxeeXDqrtfzwREa3P3OHlpSpVspR/ddrerNC+ZAd6+wyzR97vwtuYBWE6y NWyS2UZlR//CFL7J/1Wjx3QsbFjDkj79xbAcPBcebYP8ztGejcVRp1brdCcgZkmS8vVF 2v8jvAQuzQMcX+ufMBordcQqE0IrT/9nOHH6c35GQzlTkOfrGXaV/akUnJl29JMKHrIT wBdg== X-Gm-Message-State: APjAAAVp+BLYcRCGdEenf3yAlRDoGLmUDVwt1062qFhRxkvhvlWIUAES AxoIdXSPPPo0ZGwM40e6rQsWDJBoQjg= X-Google-Smtp-Source: APXvYqz5uxFN2cyrolYqcBeWRu8UyDmOqQPiNPBxtb5n6Sppj77gBg+4/J8oUqONeE5W6d+KoSjRgQ== X-Received: by 2002:a7b:c404:: with SMTP id k4mr12324185wmi.117.1552925720184; Mon, 18 Mar 2019 09:15:20 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z9sm3269728wmf.12.2019.03.18.09.15.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 18 Mar 2019 09:15:19 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= Subject: [PATCH 3/4] gc docs: de-duplicate "OPTIONS" and "CONFIGURATION" Date: Mon, 18 Mar 2019 17:15:01 +0100 Message-Id: <20190318161502.7979-4-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In an earlier commit I started including the "gc.*" documentation from git-config(1) in the git-gc(1) documentation. That still left us in a state where the "--auto" option and "gc.auto" were redundantly discussing the same thing. Fix that by briefly discussing how the option itself works for "--auto", and for the rest referring to the configuration documentation. This revealed existing blind spots in the configuration documentation, move over the documentation and reword as appropriate. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config/gc.txt | 27 +++++++++++++++++++++++---- Documentation/git-gc.txt | 25 ++++--------------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/Documentation/config/gc.txt b/Documentation/config/gc.txt index a834a801cd6..605e14bc80b 100644 --- a/Documentation/config/gc.txt +++ b/Documentation/config/gc.txt @@ -19,13 +19,27 @@ gc.auto:: objects in the repository, `git gc --auto` will pack them. Some Porcelain commands use this command to perform a light-weight garbage collection from time to time. The - default value is 6700. Setting this to 0 disables it. + default value is 6700. ++ +Setting this to 0 disables not only automatic packing based on the +number of loose objects, but any other heuristic `git gc --auto` will +otherwise use to determine if there's work to do, such as +`gc.autoPackLimit`. ++ +The repacking of loose objects will be performed with `git repack -d +-l`. gc.autoPackLimit:: + When there are more than this many packs that are not marked with `*.keep` file in the repository, `git gc --auto` consolidates them into one larger pack. The - default value is 50. Setting this to 0 disables it. + default value is 50. Setting this (or `gc.auto`) to 0 + disables it. Packs will be consolidated using the `-A` option + of `git repack`. ++ +See the `gc.bigPackThreshold` configuration variable below. When in +use it'll effect how the auto pack limit works. gc.autoDetach:: Make `git gc --auto` return immediately and run in background @@ -35,13 +49,18 @@ gc.bigPackThreshold:: If non-zero, all packs larger than this limit are kept when `git gc` is run. This is very similar to `--keep-base-pack` except that all packs that meet the threshold are kept, not - just the base pack. Defaults to zero. Common unit suffixes of - 'k', 'm', or 'g' are supported. + just the base pack. Defaults to zero or a memory heuristic. + Common unit suffixes of 'k', 'm', or 'g' are supported. + Note that if the number of kept packs is more than gc.autoPackLimit, this configuration variable is ignored, all packs except the base pack will be repacked. After this the number of packs should go below gc.autoPackLimit and gc.bigPackThreshold should be respected again. ++ +If the amount of memory is estimated not enough for `git repack` to +run smoothly and `gc.bigPackThreshold` is not set, the largest pack +will also be excluded (which is the equivalent of running `git gc` +with `--keep-base-pack`). gc.writeCommitGraph:: If true, then gc will rewrite the commit-graph file when diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index 9edf4e465b4..154c7c5e652 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -49,29 +49,12 @@ OPTIONS --auto:: With this option, 'git gc' checks whether any housekeeping is required; if not, it exits without performing any work. - Some git commands run `git gc --auto` after performing - operations that could create many loose objects. Housekeeping - is required if there are too many loose objects or too many - packs in the repository. + -If the number of loose objects exceeds the value of the `gc.auto` -configuration variable, then all loose objects are combined into a -single pack using `git repack -d -l`. Setting the value of `gc.auto` -to 0 disables automatic packing of loose objects. +See the `gc.auto' option in the "CONFIGURATION" below for how this +heuristic works. + -If the number of packs exceeds the value of `gc.autoPackLimit`, -then existing packs (except those marked with a `.keep` file -or over `gc.bigPackThreshold` limit) -are consolidated into a single pack by using the `-A` option of -'git repack'. -If the amount of memory is estimated not enough for `git repack` to -run smoothly and `gc.bigPackThreshold` is not set, the largest -pack will also be excluded (this is the equivalent of running `git gc` -with `--keep-base-pack`). -Setting `gc.autoPackLimit` to 0 disables automatic consolidation of -packs. -+ -If houskeeping is required due to many loose objects or packs, all +Once housekeeping is triggered by exceeding the limits of +configurations options such as `gc.auto` and `gc.autoPackLimit`, all other housekeeping tasks (e.g. rerere, working trees, reflog...) will be performed as well. From patchwork Mon Mar 18 16:15:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10857997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A08E6C2 for ; Mon, 18 Mar 2019 16:15:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61AF829080 for ; Mon, 18 Mar 2019 16:15:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55AFA2909C; Mon, 18 Mar 2019 16:15:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4362829080 for ; Mon, 18 Mar 2019 16:15:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727710AbfCRQPZ (ORCPT ); Mon, 18 Mar 2019 12:15:25 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37299 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727597AbfCRQPX (ORCPT ); Mon, 18 Mar 2019 12:15:23 -0400 Received: by mail-wr1-f66.google.com with SMTP id y15so17736482wro.4 for ; Mon, 18 Mar 2019 09:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r668F2eV0Qyvi+UucT5Ntky+AJIT9xy8S3FcPTen4RE=; b=DQg/fi2eqq2llYNoZA7d3Yp9CDDp4zTRZmXe/7Vw3mNvgSi7PIjEA39jIWul5jbE/b +2bg2cC6aAUE8+/J6YBdLJLNTYC1U6ag2SRR+CEDwGivWq2KYri247gVB/Kn1bsyoCe0 XMEZFosuXcCuGxriSg7O5+Ixf0MsslrLXATP1ByJfQt7O9MU215KOwndPZvZdan1Nmqf fQ+QZi/8+A+BPOg9Wge72xrEVKQJzxu/i8KCNd3XZ6kxoz6rNosQfpfrFrcsrKcNw4Zq QDLO1/5llNraBilTaQcva9cJtmoL4lXYLYz9QeQeuFsdpv8Xww8EEfXC7BpYEKNv2vZJ pnhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r668F2eV0Qyvi+UucT5Ntky+AJIT9xy8S3FcPTen4RE=; b=kfyPFVLjn80rRmUwG9LiISCGZtgyWXwY/im03W7911kP0nKH+1Kfigl5d6vmeLzRXy owbYuHnLql80N40RB9Q7LNikMpjb85YFyUpBcVGXSRrBLDz7zKwV5Q6Tqf7QvBZm+7g9 8aA0Hv9jnyHypMn/TEf+Y/TIac9AOxt9k3Lo7b0TCE1K7B3nWK0s/3R23PLiQaCY1/fF 1khzhsyZ3pmgrYcahxnMg2zI7jRmFfpAJsJz10+RkrYm/8hLF8lJ735QFKzE5mTOWOMG NdB9cHTJ5Q/IdSVvawfYF+h0xiNV9dqn7L4zzoVDeJRtL+AmHM+doKTp5oFj1Zf2BXoK +Daw== X-Gm-Message-State: APjAAAVDrRO3qDxpVSsQMrMbgM5h7OEQ0xF7DIGoHIFqhS21YXQjaDpK dAU8RK/QJ2Hn3+3Q3jPzNOR5LzXWBmU= X-Google-Smtp-Source: APXvYqycTX0u8ZGPFxwIvYEEVi95oKpyaGPfnrUhJu69j3pdXLnHTgvIwAE/FBLoq4RLHhh2p/xedw== X-Received: by 2002:adf:d848:: with SMTP id k8mr3344184wrl.185.1552925721397; Mon, 18 Mar 2019 09:15:21 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id z9sm3269728wmf.12.2019.03.18.09.15.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 18 Mar 2019 09:15:20 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBC?= =?utf-8?b?amFybWFzb24=?= Subject: [PATCH 4/4] gc docs: downplay the usefulness of --aggressive Date: Mon, 18 Mar 2019 17:15:02 +0100 Message-Id: <20190318161502.7979-5-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The existing "gc --aggressive" docs come just short of recommending to users that they run it regularly. In reality it's a waste of CPU for most users, and may even make things actively worse. I've personally talked to many users who've taken these docs as an advice to use this option, and have. Let's change this documentation to better reflect reality, i.e. for most users using --aggressive is a waste of time, and may even be actively making things worse. Let's also clarify the "The effects [...] are persistent" to clearly note that that's true to the extent that subsequent gc's aren't going to re-roll existing packs generated with --aggressive into a new set of packs. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-gc.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index 154c7c5e652..d0eaba98db5 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -41,10 +41,20 @@ OPTIONS --aggressive:: Usually 'git gc' runs very quickly while providing good disk space utilization and performance. This option will cause - 'git gc' to more aggressively optimize the repository at the expense - of taking much more time. The effects of this optimization are - persistent, so this option only needs to be used occasionally; every - few hundred changesets or so. + 'git gc' to more aggressively optimize the repository to save storage space + at the expense of taking much more time. ++ +Using this option may optimize for disk space at the expense of +runtime performance. See the `--depth` and `--window` documentation in +linkgit:git-repack[1]. It is not recommended that this option be used +to improve performance for a given repository without running tailored +performance benchmarks on it. It may make things better, or worse. Not +using this at all is the right trade-off for most users and their +repositories. ++ +The effects of this option are persistent to the extent that +`gc.autoPackLimit` and friends don't cause a consolidation of existing +pack(s) generated with this option. --auto:: With this option, 'git gc' checks whether any housekeeping is From patchwork Thu Mar 21 20:50:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10864353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB9D06C2 for ; Thu, 21 Mar 2019 20:51:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B100B2A4CE for ; Thu, 21 Mar 2019 20:51:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4E302A4D0; Thu, 21 Mar 2019 20:51:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4723D2A4CE for ; Thu, 21 Mar 2019 20:51:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbfCUUvN (ORCPT ); Thu, 21 Mar 2019 16:51:13 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44371 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbfCUUvN (ORCPT ); Thu, 21 Mar 2019 16:51:13 -0400 Received: by mail-wr1-f67.google.com with SMTP id w2so41388wrt.11 for ; Thu, 21 Mar 2019 13:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+qdcbY4knywdY0KgKM7U5q/OHcbFDdWPUwgxeXJGnTw=; b=mDOANsOkdpEEgLokY+9urpmZbm1uRcabR5t467NMqvjzCgqv3DKeiI4WpwU/+F3Xi0 0Yt9KB6QQ3InISbOpnzvsyeFm5bjJoIikrAt3P2QL8UrfaOjqrvjzX2iDBWVX9oQa8cX o/XZP435IgkM9nmuZH4NO75PmE874IvZdszPfpWH4bcQZdRd9TLAY+V8UMUdoCOwtWPx iB819tit5YsBjat4B1j1sIwuNcbhR9VKOl8MHtEKc4y2LNgtso26qerdvxetp3gFOjoq pkR02/wEA0r1yAptqKCbHPgsMaleYmHlSKqbpSpjI8+3g4HSLTupRh5NF7B5PVU6D1vI 2mnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+qdcbY4knywdY0KgKM7U5q/OHcbFDdWPUwgxeXJGnTw=; b=oaxI+lAuzVULAxJxzRQXC3ROD+giB3w55RYWiVF9xPxKaTZg8U+6DOVEStR9WUYkR6 Xb5Vf+eIDMolYQleb0XBgEdeU4wCnccaVE0azrprFohXPJWs1aqBaYce+ZDVKchUt88x G3b81/k7Zzv0LQr8Et5AjfE2ZhMYmgdwLsp14puOrODvzlNlDk8lvD5UAOLsCkVfC4RL PUpQDd2oTaNqhn/dJ/HhxGFCMrj+G6T6VwXbPdKXCpdTKqHgfp+S4WScsFyGBQOpfc89 XJ9wjFVcCUK0pJtuEfshIs+jLG1v46GQl1vnqG9WMaH9U3NG826O1rPM4hY5mu0hWToj gqlQ== X-Gm-Message-State: APjAAAV+yIM96nBu+hkGo6Zyw3EhGcK5cy4wivZU73w7fOVxuS/h9aIj nWLnHYe7Nia+wzJvxI78pTuf7bCj X-Google-Smtp-Source: APXvYqzPGzrHkgLqC+9a4tfL670mxBkDSsPlTCXse5mdMJM0xTd9Ww47B0pf54o6/NNPe3kbixI3Xg== X-Received: by 2002:adf:eaca:: with SMTP id o10mr3997638wrn.273.1553201470714; Thu, 21 Mar 2019 13:51:10 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id b4sm6053978wmj.3.2019.03.21.13.51.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 21 Mar 2019 13:51:09 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , Johannes Sixt , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 05/10] gc docs: re-flow the "gc.*" section in "config" Date: Thu, 21 Mar 2019 21:50:49 +0100 Message-Id: <20190321205054.17109-6-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Re-flow the "gc.*" section in "config". A previous commit moved this over from the "gc" docs, but tried to keep as many of the lines identical to benefit from diff's move detection. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config/gc.txt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Documentation/config/gc.txt b/Documentation/config/gc.txt index a255ae67b0..3e7fc052d9 100644 --- a/Documentation/config/gc.txt +++ b/Documentation/config/gc.txt @@ -53,9 +53,9 @@ will be repacked. After this the number of packs should go below gc.autoPackLimit and gc.bigPackThreshold should be respected again. + If the amount of memory estimated for `git repack` to run smoothly is -not available and `gc.bigPackThreshold` is not set, the largest -pack will also be excluded (this is the equivalent of running `git gc` -with `--keep-base-pack`). +not available and `gc.bigPackThreshold` is not set, the largest pack +will also be excluded (this is the equivalent of running `git gc` with +`--keep-base-pack`). gc.writeCommitGraph:: If true, then gc will rewrite the commit-graph file when @@ -115,12 +115,11 @@ gc..reflogExpireUnreachable:: in the middle, the setting applies only to the refs that match the . + -These types of entries are generally created as -a result of using `git commit --amend` or `git rebase` and are the -commits prior to the amend or rebase occurring. Since these changes -are not part of the current project most users will want to expire -them sooner, which is why the default is more aggressive than -`gc.reflogExpire`. +These types of entries are generally created as a result of using `git +commit --amend` or `git rebase` and are the commits prior to the amend +or rebase occurring. Since these changes are not part of the current +project most users will want to expire them sooner, which is why the +default is more aggressive than `gc.reflogExpire`. gc.rerereResolved:: Records of conflicted merge you resolved earlier are From patchwork Thu Mar 21 20:50:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10864355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02D986C2 for ; Thu, 21 Mar 2019 20:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEE582A4CE for ; Thu, 21 Mar 2019 20:51:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2CCE2A4D0; Thu, 21 Mar 2019 20:51:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B65E2A4CE for ; Thu, 21 Mar 2019 20:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726801AbfCUUvQ (ORCPT ); Thu, 21 Mar 2019 16:51:16 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37508 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbfCUUvO (ORCPT ); Thu, 21 Mar 2019 16:51:14 -0400 Received: by mail-wr1-f66.google.com with SMTP id w10so78541wrm.4 for ; Thu, 21 Mar 2019 13:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x4QaktJ3nM883Fcn9N598BG5hLdRnIVKhJi7568eurU=; b=nF1LZhGQRw25EsvGTLoO2bJL0BymK0ApzqXPomCJ2SSAn8NFtCs5ll0yiinB5JVa72 gDsBxSHSNo9zwrlANUPleNck0uyxlQSel3LSSEFOCHuawGcyYL/7CnDhnlhrlUcFxMbL UZUi4ELQAhJ/ewWG87J1b3KGn/R19DIpHElMpzYQpFDOlvJdJaJT22VWxoQlUwK2WNbV pEyZ+gSVnm0DOhDLayKIVxUUAExGdO8QeVhcqHAUVqPNo+f8DJyylFJ9bt8LxkuTAlnh 9EnJf8N1Oji0IhMtpJWUo9wloI7Q9WukNDPPdQZofxm/Rw/Jf2NrKeuBN+b4RSpnx1WR nd0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x4QaktJ3nM883Fcn9N598BG5hLdRnIVKhJi7568eurU=; b=TXhtPTy4tnszd31aoOXk4XBh9/ZnT4AZ/JyPVlwbFYJh9Z7eK2GbPZPC2TwXsLnzkC RiLBSYxBadV2XhL6ahERRrSR4F+86ylyTpjOp2oaKJJSjnpU1hAGzoa7fwfI9NfRu2O/ Kow84BptGhIq1W7qF534ydCMCDOfl+VxASrjUm+vIVTZX0MQ3zSNOL6NoFRnvWSnv6q4 n36D7lQRdTsQ7KAn7cTrHNeaT0g8zf1op0tMif+SzlpTmBZyovQvGy6qL9WuXVFhQbfZ w/unxXaWDEWAPq7PENpFQElw54nCXDoFxuW0oT4VK+nun89qVHCAKfBJvC9QKguh7Roy EgZQ== X-Gm-Message-State: APjAAAX4q99qpUD+EPQvepjHknYvdH6egXCa6NMA4tf0Kt6TB/Gw7TU1 xnBwEgcfDE3iyaboH0SYUIAhWQk2 X-Google-Smtp-Source: APXvYqxrZM6s0CffPtKg5t5J7vK58ztGtGzFC/w7KRuPtvjCuqEsYiwQ1kWISkqLo2QNXjRNQtfO3g== X-Received: by 2002:a5d:6887:: with SMTP id h7mr4174371wru.122.1553201471924; Thu, 21 Mar 2019 13:51:11 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id b4sm6053978wmj.3.2019.03.21.13.51.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 21 Mar 2019 13:51:11 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , Johannes Sixt , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 06/10] gc docs: note how --aggressive impacts --window & --depth Date: Thu, 21 Mar 2019 21:50:50 +0100 Message-Id: <20190321205054.17109-7-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since 07e7dbf0db (gc: default aggressive depth to 50, 2016-08-11) we somewhat confusingly use the same depth under --aggressive as we do by default. As noted in that commit that makes sense, it was wrong to make more depth the default for "aggressive", and thus save disk space at the expense of runtime performance, which is usually the opposite of someone who'd like "aggressive gc" wants. But that's left us with a mostly-redundant configuration variable, so let's clearly note in its documentation that it doesn't change the default. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config/gc.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/config/gc.txt b/Documentation/config/gc.txt index 3e7fc052d9..0daa4683f6 100644 --- a/Documentation/config/gc.txt +++ b/Documentation/config/gc.txt @@ -1,7 +1,8 @@ gc.aggressiveDepth:: The depth parameter used in the delta compression algorithm used by 'git gc --aggressive'. This defaults - to 50. + to 50, which is the default for the `--depth` option when + `--aggressive` isn't in use. + See the documentation for the `--depth` option in linkgit:git-repack[1] for more details. @@ -9,7 +10,8 @@ linkgit:git-repack[1] for more details. gc.aggressiveWindow:: The window size parameter used in the delta compression algorithm used by 'git gc --aggressive'. This defaults - to 250. + to 250, which is a much more aggressive window size than + the default `--window` of 10. + See the documentation for the `--window` option in linkgit:git-repack[1] for more details. From patchwork Thu Mar 21 20:50:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10864357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2E366C2 for ; Thu, 21 Mar 2019 20:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9CDF2A4CE for ; Thu, 21 Mar 2019 20:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADF762A4D0; Thu, 21 Mar 2019 20:51:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BD0E2A4CE for ; Thu, 21 Mar 2019 20:51:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbfCUUvR (ORCPT ); Thu, 21 Mar 2019 16:51:17 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42984 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbfCUUvQ (ORCPT ); Thu, 21 Mar 2019 16:51:16 -0400 Received: by mail-wr1-f68.google.com with SMTP id g3so52901wrx.9 for ; Thu, 21 Mar 2019 13:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O7MUOzoinUH+dakHOnaP8IBFkNo1KZRRa18U2IhUNSg=; b=rGm9hqedLECqnUcgcO3nU6AVXp2s+t4FESXUmB/U7ChUKbGN5HKMdd/MmsGB0UgG1i HNpAnsbDXTIVTzRmNdkHSygDN/de53bpVoeI4qM1gBYvggANyk0+EjT84Pz9JnhdpkkK aI2UX21omu7LS02wxGF1oKaaWJMiiIDWvEI3v1OTtlJNP8Dpy36XCMaz0b/UuAjbMjB5 K4HnRJ3+l1wfhuxUp7RxsijR+5JORtmWtAqLpKKvAMna9qs7h6qSDBHYTq6Q+Dgqt7nb GSJhgg0k1LCUFLsy7a5r/ixPMEPOTXsm+ZHFoFwaumC3IFEf9XQT+iPVyQKyci4s+64G AzHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O7MUOzoinUH+dakHOnaP8IBFkNo1KZRRa18U2IhUNSg=; b=UTYsUYVevUee52T+mjPaSsTpKUjBQ7FupcDjIROAydzcTIC36ZAE7F35NK0crpC5Fn OWKyfkhJ1J6UxswaXrduX0DTVxAZgzzODpuxhnnTnX3BfpErwhnRIXiu1Jsq603Cp4g/ PNW6vybcwB4fNOh+Li4TBJOQerTcQBJPF7Xrv8fJqegXXID1ub/5LikL4VcIkaQwFXPM kWZ18m/HzZwmY0kEzxqHVpqpmB034kaagNDGAzI/Jj5TdBWbNSaePpq3umV2deDLCQwS StXl1TWlZKoLQRodkTnvFm8l3T7hI5o+AdWqi0C82zD7Up99xjcvlgbkooIQRg37OImA nKYQ== X-Gm-Message-State: APjAAAXVG6MAdcVWkMse039mra6oP7WFp5V/BCU0/VIaG7R2GFefqTw5 KB7MyyzImmdQUTW4gBweVgVeWc03 X-Google-Smtp-Source: APXvYqzYV+xRmsBCdU62OTeP2IyQaAAIN8pKRXjv/mZST1gkfqwXefIncXOKWM/TWGSEFgJwVTUY5A== X-Received: by 2002:adf:dd4a:: with SMTP id u10mr4150359wrm.322.1553201474356; Thu, 21 Mar 2019 13:51:14 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id b4sm6053978wmj.3.2019.03.21.13.51.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 21 Mar 2019 13:51:12 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , Johannes Sixt , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 07/10] gc docs: downplay the usefulness of --aggressive Date: Thu, 21 Mar 2019 21:50:51 +0100 Message-Id: <20190321205054.17109-8-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The existing "gc --aggressive" docs come just short of recommending to users that they run it regularly. I've personally talked to many users who've taken these docs as an advice to use this option, and have, usually it's (mostly) a waste of time. So let's clarify what it really does, and let the user draw their own conclusions. Let's also clarify the "The effects [...] are persistent" to paraphrase a brief version of Jeff King's explanation at [1]. 1. https://public-inbox.org/git/20190318235356.GK29661@sigill.intra.peff.net/ Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-gc.txt | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index ba1ff9b4cf..c50ec30c83 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -39,8 +39,7 @@ OPTIONS space utilization and performance. This option will cause 'git gc' to more aggressively optimize the repository at the expense of taking much more time. The effects of this optimization are - persistent, so this option only needs to be used occasionally; every - few hundred changesets or so. + mostly persistent. See the "AGGRESSIVE" section below for details. --auto:: With this option, 'git gc' checks whether any housekeeping is @@ -78,6 +77,32 @@ be performed as well. `.keep` files are consolidated into a single pack. When this option is used, `gc.bigPackThreshold` is ignored. +AGGRESSIVE +---------- + +When the `--aggressive` option is supplied, linkgit:git-repack[1] will +be invoked with the `-f` flag, which in turn will pass +`--no-reuse-delta` to linkgit:git-pack-objects[1]. This will throw +away any existing deltas and re-compute them, at the expense of +spending much more time on the repacking. + +The effects of this are mostly persistent, e.g. when packs and loose +objects are coalesced into one another pack the existing deltas in +that pack might get re-used, but there are also various cases where we +might pick a sub-optimal delta from a newer pack instead. + +Furthermore, supplying `--aggressive` will tweak the `--depth` and +`--window` options passed to linkgit:git-repack[1]. See the +`gc.aggressiveDepth` and `gc.aggressiveWindow` settings below. By +using a larger window size we're more likely to find more optimal +deltas. + +It's probably not worth it to use this option on a given repository +without running tailored performance benchmarks on it. It takes a lot +more time, and the resulting space/delta optimization may or may not +be worth it. Not using this at all is the right trade-off for most +users and their repositories. + CONFIGURATION ------------- From patchwork Thu Mar 21 20:50:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10864359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D696A922 for ; Thu, 21 Mar 2019 20:51:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD3B02A4CE for ; Thu, 21 Mar 2019 20:51:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B13382A4D0; Thu, 21 Mar 2019 20:51:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AEE62A4CE for ; Thu, 21 Mar 2019 20:51:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726824AbfCUUvT (ORCPT ); Thu, 21 Mar 2019 16:51:19 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53168 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbfCUUvR (ORCPT ); Thu, 21 Mar 2019 16:51:17 -0400 Received: by mail-wm1-f68.google.com with SMTP id a184so151538wma.2 for ; Thu, 21 Mar 2019 13:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LJ+Tll2o8YpI1TmzYeKqWi+bKk2sRZoEFWzP+4GO/8Y=; b=PrMxpjhnl1tbsxxaTWEa/EvBL9PLJXM5Kqa6rBa98bBIZcHYiRXnovHj7sB5rl0/Ph Ey2OnIU+lLkHHdM2bPPvVpOoHUr2v0ozh1i3uJdTerzQU01YNBMYeUspXRbzkd+oIKsm IJjL4nHsRCubUDqCPpd0bi0P3MTbuNEki08s0a+FYgurEenTnIjhsYXQlkhVd0Ioi/XS u7Uncp/EUBZM4uIzheF70eiv8A40YKYr6afH83SIK1Iu/ScNf0qlhoO7IrvKK7sTSEGK cgH/4c1v1VJYoZDAun2iLzmlZD2noCCF8K4NzbHqm183BDdON78QDXB/+uc6v4qhU4Np LGIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LJ+Tll2o8YpI1TmzYeKqWi+bKk2sRZoEFWzP+4GO/8Y=; b=twuY1k+qfBVHjcskPIg9Yb69n8j5ZVztsl2Gf5tR7JVaFMRaURqQdLrPzHnzvLNoXN +oeYY0FJtQRjze/nF50XdB1bSPxOTHudTISZTqCLZQAaqrZ2yJ3IUm6xTD8q10Axao0g KP3aF5y5+MWMbbfbs4iCxEZCqO6bbMsg9ZPRHPkEcg7XKkgMeOJ8r1G0hilYFMFvXhxO Ub/xMFloGXaAltNhYVd9TJn3TKz3HtLG7tNUE9DsUrbyUdGay1dp+pYfUC8ThOrveS6T k+iFUdcvCmVAkBZ9AWtNoxoNnUN80/0osDUivL2egWuIxv0irKzU4rYRRnJRuxLtjCES yauA== X-Gm-Message-State: APjAAAUZIWKuE/kjxGjp1t3pPFaFZHI9zKA0uuaib5/9OQTcoLXdNlVY rDQjO8CFiZ0lNPnui/AHwjBIjQGZ X-Google-Smtp-Source: APXvYqx0hT5CmxP/laQOEbrIG92Me/r5YHW20kR2siWrc2xCvkd3ealhG8RoARoVo8CRALxkbIDlEw== X-Received: by 2002:a1c:3845:: with SMTP id f66mr760484wma.41.1553201475525; Thu, 21 Mar 2019 13:51:15 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id b4sm6053978wmj.3.2019.03.21.13.51.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 21 Mar 2019 13:51:14 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , Johannes Sixt , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 08/10] gc docs: note "gc --aggressive" in "fast-import" Date: Thu, 21 Mar 2019 21:50:52 +0100 Message-Id: <20190321205054.17109-9-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Amend the "PACKFILE OPTIMIZATION" section in "fast-import" to explain that simply running "git gc --aggressive" after a "fast-import" should properly optimize the repository. This is simpler and more effective than the existing "repack" advice (which I'm keeping as it helps explain things) because it e.g. also packs the newly imported refs. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-fast-import.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 43ab3b1637..2248755cb7 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -1396,6 +1396,13 @@ deltas are suboptimal (see above) then also adding the `-f` option to force recomputation of all deltas can significantly reduce the final packfile size (30-50% smaller can be quite typical). +Instead of running `git repack` you can also run `git gc +--aggressive`, which will also optimize other things after an import +(e.g. pack loose refs). As noted in the "AGGRESSIVE" section in +linkgit:git-gc[1] the `--aggressive` option will find new deltas with +the `-f` option to linkgit:git-repack[1]. For the reasons elaborated +on above using `--aggressive` after a fast-import is one of the few +cases where it's known to be worthwhile. MEMORY UTILIZATION ------------------ From patchwork Thu Mar 21 20:50:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10864361 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36B77922 for ; Thu, 21 Mar 2019 20:51:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EC1A2A4CE for ; Thu, 21 Mar 2019 20:51:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12D442A4D0; Thu, 21 Mar 2019 20:51:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B01B72A4CE for ; Thu, 21 Mar 2019 20:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726840AbfCUUvV (ORCPT ); Thu, 21 Mar 2019 16:51:21 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40606 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbfCUUvT (ORCPT ); Thu, 21 Mar 2019 16:51:19 -0400 Received: by mail-wr1-f67.google.com with SMTP id t5so64762wri.7 for ; Thu, 21 Mar 2019 13:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IMotgBIQHc5fvktRakOlfYc1CeOsRyS7DaFAX2ZQKrM=; b=NcVmCpL38neChSRu5bwS4BnIVNWZLMmlOMwBmscEn3HTIRu4CQ2RiSP7Kwyd82eDss nflKoN4qzYyMboCzMredtxPzJIBi2urGSfrsZ3CfQHSQYb39Bd+Rt8ImbQj/FddDKO2q Bf+O859w90ldNYMwmJ3oAMDhZRXMsTZpt1e9TQlNoxzyv6GrxERCdjna8tUkF2VkKOBC Ks4fT3sCZv2J8OmApABK/d+OT+qBSaMCAS76dgKc/tGk+3E21SymNWgW/0fDZdyUiYOk vYO4mOoZYUmgWY8k7WOJ8kLPq2w0AvfbXhTgwUHoKkiRzXB1JCiIh1q2MhGBWpNHnEMG cnWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IMotgBIQHc5fvktRakOlfYc1CeOsRyS7DaFAX2ZQKrM=; b=c9nd1MEnT5BS68F0N8C7XLeSDHLQlwcESUU8eCPDt/pEqwfWYJGp/SxZgHlwSW3Y91 bWHebQ1vfQ+BcJr8Vz2BSFX/LS6iR+NtqmfLzJo7QN5t62+2sqtmunnXE/1SY8bdR+mE yKJr67cCEvr3PsiWjy9PSApmIZewyhAJLaNzuLlhtOLcNvqEeKlijf7JrXR8opvqhdVv tt9lbNOYwd9iWdWoDwoWx/8z+yLdrxD6iQ3pj6g4vzXmUvA8JroBHaE3/vANMJgpjTiA Mxf47HTaY7rxKevCBl7AiLQj484XMp4boalnv1aQqZIFQ9JDGPbchRHyoAljLhCW+HNw TsDg== X-Gm-Message-State: APjAAAU29519i7vaW3M7bPctjyKP/1H3XW90CqqMDnet8+wHeUPQhQfs sCob7MZeH0rjgMjMaMvayg5dXjQvn6Q= X-Google-Smtp-Source: APXvYqwPZxAbE7V/BCWVY+zh3iei/Mymu2s6Qo4+vPNxbumkNpwhbQsMX2z97Aw5u5xG3VR9tDK8XA== X-Received: by 2002:adf:df92:: with SMTP id z18mr4117835wrl.239.1553201476959; Thu, 21 Mar 2019 13:51:16 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id b4sm6053978wmj.3.2019.03.21.13.51.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 21 Mar 2019 13:51:15 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , Johannes Sixt , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 09/10] gc docs: clarify that "gc" doesn't throw away referenced objects Date: Thu, 21 Mar 2019 21:50:53 +0100 Message-Id: <20190321205054.17109-10-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Amend the "NOTES" section to fix up wording that's been with us since 3ffb58be0a ("doc/git-gc: add a note about what is collected", 2008-04-23). I can't remember when/where anymore (I think Freenode #Git), but at some point I was having a conversation with someone who was convinced that "gc" would prune things only referenced by e.g. refs/pull/*, and pointed to this section as proof. It turned out that they'd read the "branches and tags" wording here and thought just refs/{heads,tags}/* and refs/remotes/* etc. would be kept, which is what we enumerate explicitly. So let's say "other refs", even though just above we say "objects that are referenced anywhere in your repository". Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-gc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index c50ec30c83..dced7cde09 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -119,8 +119,8 @@ anywhere in your repository. In particular, it will keep not only objects referenced by your current set of branches and tags, but also objects referenced by the index, remote-tracking branches, refs saved by 'git filter-branch' in -refs/original/, or reflogs (which may reference commits in branches -that were later amended or rewound). +refs/original/, reflogs (which may reference commits in branches +that were later amended or rewound), and anything else in the refs/* namespace. If you are expecting some objects to be deleted and they aren't, check all of those locations and decide whether it makes sense in your case to remove those references. From patchwork Thu Mar 21 20:50:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-Patchwork-Id: 10864363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 112566C2 for ; Thu, 21 Mar 2019 20:51:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC1772A4CE for ; Thu, 21 Mar 2019 20:51:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E04562A4D0; Thu, 21 Mar 2019 20:51:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E29E2A4CE for ; Thu, 21 Mar 2019 20:51:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726889AbfCUUvX (ORCPT ); Thu, 21 Mar 2019 16:51:23 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55341 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbfCUUvU (ORCPT ); Thu, 21 Mar 2019 16:51:20 -0400 Received: by mail-wm1-f66.google.com with SMTP id o25so137978wmf.5 for ; Thu, 21 Mar 2019 13:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fvidnpx2kd9C0l90G3CSPCQ1QjH6VpBCqNX/YhKTwDg=; b=eMY5a/6dA4mWgITK4dZnqrs1fttmPFz3ms4HKsQ4Q9AUrpEMKGW3OdLO0HR5u77ml2 TeLd5xhBm2egRuxnUbz36H3XnDZsv5yUgCx/qbX9KMr8i2cgPVtIhOW06oLzgHw6OOj/ DVsxADI1uer5XDMTZXO7J5CC2z0W13VtPRCNw5vqOW51vbX/jum8uaywv0Ae3tro425W nM7aUuUTVWHnXttRRc3ADm8aZW63FJ9HA6cld457J+GsYOg2+bP1TnQI2SBTz5XbFvV8 nmEXapcvkcY1OqTok4DyPok/K2kTnmUNt8vHBXty0KmdPFB/fCW99/LapShMLZtIcHu2 zq2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fvidnpx2kd9C0l90G3CSPCQ1QjH6VpBCqNX/YhKTwDg=; b=IKJo07hMKtwpAJGWocLod1dohQPMVGYdhlhm8v5qYAxaHfW0QJp2dju3Z3N4GMROit UmZMMShPHNiVilD3t5f/oshOzPQcsrJHVP3qBZzYFy++eNmI+wO82FF219cYgVQtuocF +U+KFI/spq/wkasypyMwkNDy4tOS80JyUZZmMG+1dJuS+Q3pv/eGY8ZlUFuho5Tef0ww iE8mWOI4a2DbjtU08IugHwyW2gMard/8VEenvHrCys7B5pSl50ifN4LJEaOuJVdwdRTg lquk2ViXo1NN6b0dB0uzyciFheZ4b8Dvg2EBxr9i/vVXdM8DjqTCBYCRt7yuziOIum09 hX6A== X-Gm-Message-State: APjAAAUCfWVzcDvjV+ZgsF5bjOD7NExdAccBW8g1cK+31sTTZv+Dua86 Q72y3wvHUkQDZCD/gPhNN/N5JdIx+Aw= X-Google-Smtp-Source: APXvYqzjSDaGsrHW+jocY9gaISp2GWZjFxWBO8wgRmG5fjomJVbFkE3dvPEHzN5bdcqn8kPs1C+uCg== X-Received: by 2002:a1c:4e0a:: with SMTP id g10mr754768wmh.128.1553201478678; Thu, 21 Mar 2019 13:51:18 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id b4sm6053978wmj.3.2019.03.21.13.51.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 21 Mar 2019 13:51:17 -0700 (PDT) From: =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= , Jeff King , Michael Haggerty , Stefan Beller , Jonathan Nieder , Matt McCutchen , Johannes Sixt , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: [PATCH v2 10/10] gc docs: remove incorrect reference to gc.auto=0 Date: Thu, 21 Mar 2019 21:50:54 +0100 Message-Id: <20190321205054.17109-11-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190318161502.7979-1-avarab@gmail.com> References: <20190318161502.7979-1-avarab@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The chance of a repository being corrupted due to a "gc" has nothing to do with whether or not that "gc" was invoked via "gc --auto", but whether there's other concurrent operations happening. This is already noted earlier in the paragraph, so there's no reason to suggest this here. The user can infer from the rest of the documentation that "gc" will run automatically unless gc.auto=0 is set, and we shouldn't confuse the issue by implying that "gc --auto" is somehow more prone to produce corruption than a normal "gc". Well, it is in the sense that a blocking "gc" would stop you from doing anything else in *that* particular terminal window, but users are likely to have another window, or to be worried about how concurrent "gc" on a server might cause corruption. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-gc.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index dced7cde09..1826d7e3bb 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -141,8 +141,7 @@ mitigate this problem: However, these features fall short of a complete solution, so users who run commands concurrently have to live with some risk of corruption (which -seems to be low in practice) unless they turn off automatic garbage -collection with 'git config gc.auto 0'. +seems to be low in practice). HOOKS -----