From patchwork Fri Mar 22 09:32:32 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: 10865387 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 AD54914DE for ; Fri, 22 Mar 2019 09:33:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 919662A63A for ; Fri, 22 Mar 2019 09:33:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 855072A63D; Fri, 22 Mar 2019 09:33:06 +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 23C3C2A63A for ; Fri, 22 Mar 2019 09:33:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727922AbfCVJdE (ORCPT ); Fri, 22 Mar 2019 05:33:04 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:33899 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727684AbfCVJdE (ORCPT ); Fri, 22 Mar 2019 05:33:04 -0400 Received: by mail-wm1-f65.google.com with SMTP id o10so3868010wmc.1 for ; Fri, 22 Mar 2019 02:33:02 -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=6Tbe/tae1N/ST1rYfBFw3t4mz1O/zliGul1YTY740Zo=; b=Hj6A3zkNnWh+Qr0vHP88Uqrd9FXRethkWGEjNaqbNvmABwiLFzcwLPril+BE0neo7r 1aNoJL2oGNhjEnMJYfVztTON5fhqlGAmlPx+slsLRIjaGjR9lTnTj5u620Er70PwI2WX 8AaP/7h/Q7LPyhBVeVYF1AZh1NnMBle/89iDiqW8cnZg6aS6fawnSouTZ7imi76REk8a iCbKA7PEGVGNV5XhaC8eb9Wvs0TJ6Oszl5u8yiDbb8B4Q6tAOuYwVfCkReDcdhT5vwaG INZsaLzDlu4wA3RYadH0nmu1h+oj+j93nfbX5QbFoRphDhguSQs5SM/hANt4e292aBRb mH0w== 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=6Tbe/tae1N/ST1rYfBFw3t4mz1O/zliGul1YTY740Zo=; b=mijicAI5B3nVzFf1GUmx6aP8dAgLbKHIALoZQD3geNLq+ZXvb8ojRlB+iSL05AL9Nx QSJSUCXaruO2VkhnJ44kg6sI778aIl/1KUf8X1FxzDpaKb++jowxsQo4zy5654bcIUxs GoCybpue46b6BrwYXM1Y8x/DQG6kIpNCQ7z3vgl+6DdsGpckHsk4LLnCIXAi3LIYE7WI 0Yl50glrCHDQjdOj/zqB25sqv5IKIQtpU1JxOWtbdhfmPUpwAw4qaSM/jQsenmeHZ1Qf fZAE4sAQKQ2MOuLpI0j3FeGY7aaB6Rf7eeHV4hamh8iHOwVP9Fu1/XH6pqQC95vi4f09 PGrg== X-Gm-Message-State: APjAAAW0FZuggcqNb5z4k5vUyjFZP1mdkIJYT31h6wW5qBLuFymbG/PT AbK7WTisoBkItVnMSgkuzijyoQdQ5Ek= X-Google-Smtp-Source: APXvYqz+LRxNzR11vvmDCxXwCD77vg3j2/0ewSeu5oFHyoWrAMY7n86/yMt5OfvyolXdyJ6reKwuFA== X-Received: by 2002:a1c:2d4c:: with SMTP id t73mr2316681wmt.142.1553247181364; Fri, 22 Mar 2019 02:33:01 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:00 -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 v3 01/11] gc docs: modernize the advice for manually running "gc" Date: Fri, 22 Mar 2019 10:32:32 +0100 Message-Id: <20190322093242.5508-2-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 except in exceptional circumstances. Let's instead have this reflect reality and say that most users don't need to run this manually at all, while briefly describing the sorts sort of cases where "gc" does need to be run manually. Since we're recommending that users run this most of the and usually don't need to tweak it, let's tone down the very prominent example of the gc.auto=0 command. It's sufficient to point to the gc.auto documentation below. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-gc.txt | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index a7c1b0f60e..dd22eecc79 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -20,17 +20,16 @@ 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. - -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: - ----------------------- -$ git config --global gc.auto 0 ----------------------- +When common porcelain operations that create objects are run, they +will check whether the repository has grown substantially since the +last maintenance, and if so run `git gc` automatically. See `gc.auto` +below for how to disable this behavior. + +Running `git gc` manually should only be needed when adding objects to +a repository without regularly running such porcelain commands, to do +a one-off repository optimization, or e.g. to clean up a suboptimal +mass-import. See the "PACKFILE OPTIMIZATION" section in +linkgit:git-fast-import[1] for more details on the import case. OPTIONS ------- From patchwork Fri Mar 22 09:32:33 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: 10865389 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 D451E14DE for ; Fri, 22 Mar 2019 09:33:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB7E82A645 for ; Fri, 22 Mar 2019 09:33:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD8BA2A646; Fri, 22 Mar 2019 09:33:07 +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 547A82A63C for ; Fri, 22 Mar 2019 09:33:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727927AbfCVJdF (ORCPT ); Fri, 22 Mar 2019 05:33:05 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35750 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727919AbfCVJdE (ORCPT ); Fri, 22 Mar 2019 05:33:04 -0400 Received: by mail-wm1-f67.google.com with SMTP id y197so1437344wmd.0 for ; Fri, 22 Mar 2019 02:33:04 -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=HWjU33OyEdr/osAHjqAJgkK11bvMFRIpeWMq+fsTe9Y=; b=WtXfjHzxASDx/Sgl3u8nqZDrhmyHqE5tPPGqLjixsg1kZbFcKiyChAs7f5C+IVgEJR wFQ7ypB6MnbxTFFlB7hoP5D7LO0BpAPA348ktPlUSCGyr5dCKmAnr/df3ZAHJRm4e91z LkZ8OXzkX7uMXAH5QOcCG3n+gfA1s5ByQfwYpV5JKGUTKhiqkRIVusZe+USQ3ouW/TCG 566M+hEl8mcfa9mX/s5IF/iPfCg3DqHoQcVyX6fyq4K1+cFBvM3I/4G8x44ABs4t9cRI xt8sog96tfqYmEYKQBvTF4Gw5nIw83o7SZy1JHzZgOCne/m+euUEjYzdk1rqWWb7bBbV lsfg== 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=HWjU33OyEdr/osAHjqAJgkK11bvMFRIpeWMq+fsTe9Y=; b=ViyNOmVQ4ywKoveQcqQEKIz+uNqSIyf1Z0ujImOUXrCPaTzUb1CFvI9wkll37OVlst bfMiw5Yge40lQd8nF4ea6+O8k0eZnGP7sFMkqn9zX4Ro1E3LVGMWiCoqDWX3p3icqL3O Oxp+fl2rR1vlY6vOVqYCUBN678G/P/5qH3JvQhKz9wo+gLjzjUM66QxKHS6ceQBtrOJD 7n2fJS9oPAM49jU/w0G6/JGDjF1HOcHp8qSgCY1tefo/PE5zJ6Kb4bsvZ78B/h//8Vjt 975h5d1+9L2dGZa7w2c/nhtf7QxzHOhvG9iJqmVGNFc194Ysnmaaw1IFRV8MBw8b2iLx EutA== X-Gm-Message-State: APjAAAUbq1vTRmX9DF3TWcyC338NBU442KHR6YbhVVaJYDDQ/AGFp1B6 bvW2hIjVeupP2bu7QGumpZyXETmB5Js= X-Google-Smtp-Source: APXvYqyrmJthCcTO4+2FJVeMa7+hliV2e6qwX9Qtzgr8mlnHDOjWf4AUnntW7Aw5GNMlMUsZGz8urA== X-Received: by 2002:a1c:f115:: with SMTP id p21mr2433330wmh.93.1553247182902; Fri, 22 Mar 2019 02:33:02 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:02 -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 v3 02/11] gc docs: stop noting "repack" flags Date: Fri, 22 Mar 2019 10:32:33 +0100 Message-Id: <20190322093242.5508-3-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 Remove the mention of specific flags from the "gc" documentation, and leave it at describing what we'll do instead. As seen in builtin/gc.c we'll use various repack flags depending on what we detect we need to do, so this isn't always accurate. More importantly, a subsequent change is about to remove all this documentation and replace it with an include of the gc.* docs in git-config(1). By first changing this it's easier to reason about that subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-gc.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index dd22eecc79..c56f4f7cde 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -52,14 +52,13 @@ OPTIONS + 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` +single pack. Setting the value of `gc.auto` to 0 disables automatic packing of loose objects. + 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'. +are consolidated into a single pack. 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` From patchwork Fri Mar 22 09:32:34 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: 10865391 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 DF285139A for ; Fri, 22 Mar 2019 09:33:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C57C92A63A for ; Fri, 22 Mar 2019 09:33:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9D582A642; Fri, 22 Mar 2019 09:33:10 +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 61FBE2A63A for ; Fri, 22 Mar 2019 09:33:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727940AbfCVJdJ (ORCPT ); Fri, 22 Mar 2019 05:33:09 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43140 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727684AbfCVJdG (ORCPT ); Fri, 22 Mar 2019 05:33:06 -0400 Received: by mail-wr1-f68.google.com with SMTP id d17so1513096wre.10 for ; Fri, 22 Mar 2019 02:33:05 -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=jib3do62HBczUeB+oBoN71sAedr5IFP+YlGi9nRh/qI=; b=L9ifJzX18QYuA53eCB+E4dHy6bBr8vo8YHy/4uKzz96RZN92rCMunn4agaszg/7+6i xn3k5lIrLgMgD+r80SbhQGDm8kl7mS1ErI2MfbmKlq1q0w8EibcwmEoboz7p6JZYVKxQ SK1c6WXjOBgFEGTALYC9UteCVB4Dltgc3QNB87yYG4fSpg1J6YxQJFjuVnRAa46fZjlo W0ymAqcLhceVzHV8Ch9UvHSkALTtnYjSbYyl297nCU0LBSZKMkAos5hY04q+P6NZhH4/ VTNtTlXfRf4UWc1gvI/+a63jCKrenpR2LDQQwuaUqRktvdj3c+DQi0/KpEq8hi9uIhSj aV5g== 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=jib3do62HBczUeB+oBoN71sAedr5IFP+YlGi9nRh/qI=; b=aCYRz0jiqDiO34j1YHaxx904J+3VXTbU3rfyGuCu6AJIiMieMUaW+f58H4puzX7wCB XrTii/K5Z/VJFsi2OhZKirYt7Rg/B8ViioUi3Qsog8jzSa9j6aN7ZMpLAocquZHqkiGM ER00UIW3CfokwJjJ1CtVn+WMTBEoK3gbuBh/Pz+CQ0knD+WWAtE0RmZ6gQvBKDffc7TG UsVnsMQkhd3kYLhj3XjP6aCs2Qxtj3MemO+qzubqJLWnlDo7zvSRRS91s6CFhIGA71JE 3J35zq49Au6r5j91dpuUMcD8R2vaDoC99M4qbe4WxuCJ/X2qHyoq5J5CDLPxy+iB2qJ1 2how== X-Gm-Message-State: APjAAAXJhFwkCHrpNpI5jUdx/U65WCtfeKACtEbwDY4scVurxTM+AQne zheCfagsupFRZKJi9oGPWZTwS3MY9rI= X-Google-Smtp-Source: APXvYqyFGYq1ZoDKaSpZ40fPqbPM/TL9a/6FQralaMkU+f3a4/0ALSUHj72OM5MQlzuiQ1g45yrO/g== X-Received: by 2002:adf:cd06:: with SMTP id w6mr5927017wrm.52.1553247183958; Fri, 22 Mar 2019 02:33:03 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:03 -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 v3 03/11] gc docs: clean grammar for "gc.bigPackThreshold" Date: Fri, 22 Mar 2019 10:32:34 +0100 Message-Id: <20190322093242.5508-4-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 Clean up the grammar in the documentation for "gc.bigPackThreshold". This documentation was added in 9806f5a7bf ("gc --auto: exclude base pack if not enough mem to "repack -ad"", 2018-04-15). Saying "the amount of memory estimated for" flows more smoothly than the previous "the amount of memory is estimated not enough". Suggested-by: Jeff King 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 c56f4f7cde..66386439b7 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -59,8 +59,8 @@ 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. -If the amount of memory is estimated not enough for `git repack` to -run smoothly and `gc.bigPackThreshold` is not set, the largest +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`). Setting `gc.autoPackLimit` to 0 disables automatic consolidation of From patchwork Fri Mar 22 09:32:35 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: 10865397 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 87B3F139A for ; Fri, 22 Mar 2019 09:33:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CEA32A63B for ; Fri, 22 Mar 2019 09:33:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 617462A63D; Fri, 22 Mar 2019 09:33:16 +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 74B472A640 for ; Fri, 22 Mar 2019 09:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727934AbfCVJdJ (ORCPT ); Fri, 22 Mar 2019 05:33:09 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:36186 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727919AbfCVJdI (ORCPT ); Fri, 22 Mar 2019 05:33:08 -0400 Received: by mail-wr1-f47.google.com with SMTP id y13so1554895wrd.3 for ; Fri, 22 Mar 2019 02:33:06 -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=B9QhC8VKdT3oiryVnZe9Q6K88y5w7jnpncMv3vAKIjc=; b=lmROaBW1e2oVKjL6p4ogFyw+ekaZlHasPLAd/eBlGTHDjphM/Ld8Ixr9gRN5wNylBg DJIDRE6LQMHx7MEkAbl3IRTNUY5MJlwSdN1P7IfN48ubOHpLWJII7u4bmaGJC41XqxHb oPL1QE83ioPoExj2xuDI6r9XpKFBoFXQT7FuX8r3KntO3KITmkrO9a2YF+5TYSqCRTkL V4h0XjaHrNmf80kNpED96vmYcRCOsuKKSJ1SmMPQttfOwJ2No0OqIGORLiGsnx9AxkTT ssKefvM6O1wwSXGdDKnBPfq9T9CU0mVhFDPSR0j5dcPF4uW62ZyHAihFNozASJoaopEH rdFQ== 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=B9QhC8VKdT3oiryVnZe9Q6K88y5w7jnpncMv3vAKIjc=; b=YL0booCg+hHa0oFeCpD41SggzPYHzbMulJS2UI4U/08n5zyBW4optwGA8mp6NXT4WD dZy4+eZ7hLmqoTFr6zqiPvHz/pEj29sdzDhvxzrUNcp7GFORXmierQIX8LGRiPU6luUd ZYpTScoWnTfmz9cVkOYgdqidxFty/amvNB2vJujGAA8fy55yKNvPUR2EpB0R/2/b72bI Vlv20+ltNQdzgRFlL8Vj+gb26QEqWHuifCaHiLYEigSXsfXbwXRXPwUuhSht+pWWlt24 ZJ4Qa/nObMLBm7PkNDbASMot0YvKUuYeJnoitUWwBSlb/3lnWlz1CZMbGC2yFeBaZ2Uy NiZQ== X-Gm-Message-State: APjAAAVkCVw/xJoM3xOHOSJJuSdotIqh61EtxdRRkpB6VxCG6Bn4ua2O 4Pvv7OxzvlFNQGIZHey0Cmtn+bzyy0g= X-Google-Smtp-Source: APXvYqy/XqyixAaetFVVmfJJrZCKPvQ6C+4NMCNbbLbYyUtRPxTiggpGBJV0QCHMbvNYQb8xg+NsSg== X-Received: by 2002:adf:e449:: with SMTP id t9mr5496650wrm.204.1553247185478; Fri, 22 Mar 2019 02:33:05 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:04 -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 v3 04/11] gc docs: include the "gc.*" section from "config" in "gc" Date: Fri, 22 Mar 2019 10:32:35 +0100 Message-Id: <20190322093242.5508-5-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 | 29 ++++++++++++- Documentation/git-gc.txt | 86 +++---------------------------------- 2 files changed, 35 insertions(+), 80 deletions(-) diff --git a/Documentation/config/gc.txt b/Documentation/config/gc.txt index c6fbb8a96f..a255ae67b0 100644 --- a/Documentation/config/gc.txt +++ b/Documentation/config/gc.txt @@ -2,24 +2,39 @@ 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 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`. 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. + Setting `gc.auto` to 0 will also disable this. ++ +See the `gc.bigPackThreshold` configuration variable below. When in +use, it'll affect how the auto pack limit works. gc.autoDetach:: Make `git gc --auto` return immediately and run in background @@ -36,6 +51,11 @@ 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 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`). gc.writeCommitGraph:: If true, then gc will rewrite the commit-graph file when @@ -94,6 +114,13 @@ 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 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 66386439b7..c037a46b09 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -45,28 +45,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. Setting the value of `gc.auto` -to 0 disables automatic packing of loose objects. +See the `gc.auto' option in the "CONFIGURATION" section 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. -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`). -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 +configuration options such as `gc.auto` and `gc.autoPackLimit`, all other housekeeping tasks (e.g. rerere, working trees, reflog...) will be performed as well. @@ -97,66 +81,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 Fri Mar 22 09:32:36 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: 10865395 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 AFEFD14DE for ; Fri, 22 Mar 2019 09:33:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9321B2A63D for ; Fri, 22 Mar 2019 09:33:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86E952A641; Fri, 22 Mar 2019 09:33:13 +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 2C16D2A63D for ; Fri, 22 Mar 2019 09:33:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727936AbfCVJdJ (ORCPT ); Fri, 22 Mar 2019 05:33:09 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:33068 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727929AbfCVJdI (ORCPT ); Fri, 22 Mar 2019 05:33:08 -0400 Received: by mail-wm1-f65.google.com with SMTP id z6so3879686wmi.0 for ; Fri, 22 Mar 2019 02:33:07 -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=r3umLyU8h1hqZmNDpofdZiRhPKVb+4/Ezpq9Vvxq19hKaViBvgu+PO9Yo9++MjAgqJ UnqwosGyaBjJnc93UVF6iNrkR28VxJf3op7NCMX2xwBKaJ2cgzjs8Pu8r6UJAQuLO2Qk FGdGcQ1PlLdW8Lf92aoSYDv2ATHNrrduDjT1VVFy3oi1F4E6hwBFsOObmWfLAQN/LngK 0x2xt2/rdoo/6hDzXCxUWbllXrYKvFh8Ygz2a3Q3ra2u9jO3g7H30VA+EGF90SIV10rq g92QDOGu0zVp3rUunQ/vROGKRnNAtcglLEX/rMIml9W8LKTrjkgRBBxPMirmR9u34wcG K6ng== 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=WEsmTaY8ZnhQ4d6OheIMogu6jCUHCvJZDWCE9wIQNnuQ2Mcpobtx5m6Y/VV3d/mgQ+ UX5ztv3CTh4mJs9wX2A72cJCvtholPTB/bYTj5FdBaoMyhmLLtCjdPLWtzSF4AlDV13Y XcLLvf4svbb+d7nXsC/9ukR04tNYoPyOO92ffBDoPVvgLcURfszBOOIcc4jr1jBGWGAs wJt6ZjgidRhhMRVtb6xu79FFvpNCNdYz8JP4DbZdzxiwX5zetuWd9QQO5DTCqp1InvZP sovxNCRZzCcXTnz9tD8BhTNSl4JcLyrwT2wJfsGhnbY6071/5d/0Bl94Dx+5pmcEBTl1 QSrQ== X-Gm-Message-State: APjAAAV0iZcbCsDC8WJ8F6GhN3kMEIdD3StiiaDfLviuK7ooTzJaZeNZ 2QrkslxjiDoyGnqX2k3y+DX4i6d2+7E= X-Google-Smtp-Source: APXvYqwU0EbhfWQbkDDSwGVxPk3ALfA8vXDcGAQoiIFvQhwsxLOaiQGVQHXOE9DeNzuWy5IMW5ZefA== X-Received: by 2002:a1c:41d6:: with SMTP id o205mr2264929wma.2.1553247186692; Fri, 22 Mar 2019 02:33:06 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:05 -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 v3 05/11] gc docs: re-flow the "gc.*" section in "config" Date: Fri, 22 Mar 2019 10:32:36 +0100 Message-Id: <20190322093242.5508-6-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 Fri Mar 22 09:32:37 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: 10865393 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 EF8BE14DE for ; Fri, 22 Mar 2019 09:33:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6E1E2A638 for ; Fri, 22 Mar 2019 09:33:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB7832A642; Fri, 22 Mar 2019 09:33:12 +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 741C72A638 for ; Fri, 22 Mar 2019 09:33:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727945AbfCVJdL (ORCPT ); Fri, 22 Mar 2019 05:33:11 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51884 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727930AbfCVJdK (ORCPT ); Fri, 22 Mar 2019 05:33:10 -0400 Received: by mail-wm1-f65.google.com with SMTP id 4so1426893wmf.1 for ; Fri, 22 Mar 2019 02:33:08 -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=ymah7V7qjj0iS6332aEkdrxLe9QKJfxCLGBu7hRDLaE=; b=o42Osz5lXdXsmqAz5qFpQbNKmHLN5H1gdyFlkp0+zn8k9JrmFEhNDtt30sK/DIeev3 1ZrctD4T4I26Ba4py3soUwVqFlAV7YH4RYCkACW5b/1xDb6jdKSckJx+iVOy28PRpKh1 75FKzinIyciJq+TTH6WLxq1dJAD4lp6t5rWfAHUKHW7mnbRQawPJvtru6Znt3ZeKJntF BPKEWM94Lqt0i4NhGhNfYiacK0VdVvEBmGoeDFOC7FlYqVM+C0KpOhMYSm4jI8mI5lvv Ub8hSmohY6ARaPnuzFO4gdHw8BaISxqt7SJHhTV7oFKY9y4Qs4SgujKhEUcP7EcgOmvG 8UDA== 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=ymah7V7qjj0iS6332aEkdrxLe9QKJfxCLGBu7hRDLaE=; b=MHB8DATuNlFgp6YkhszOPtLLCPHluDTXY41jiV/Th8NBGfJoNIwcrOjVWBPSmvnkAk XQzY3hFZynKls0EswYumE1v5w4fcIOgoeP+7rfNDV8IJmzrLLL4GGicyp5BpzFiVO7O2 8cHre2liMec9GMErr+0wiAIJywYmi+r/MXNC6nZJo2es9GM9TVmIA+0cJNC0TH2KAI5E IddrO1KXcCy2jKTl2lOJVkO99x7VK4YwzvEfn3j2N6Dt16Z7pV8UlquEUVzr8d1Yxscb fKYlEJyezRBRyjXFYQjZW1+5OfANLKfFoLVILWyE8h48hKQWaOg5oz77VJcghCMBxXLJ l5nQ== X-Gm-Message-State: APjAAAW1Z5SQ/rklJPV4LrgIoZpaWUq3QUwt3jvRETnx8ZCaFCQf894W onAnWXwZdUv7S/k7d3mbhiWoEYZgUNk= X-Google-Smtp-Source: APXvYqwpXlcBQjzgn9Pm1xh9nZy72m4cEr5lKrhkkOfbaKf2XmdB/RBif6fhaqoK+MGTrjtFhh9fkQ== X-Received: by 2002:a05:600c:2293:: with SMTP id 19mr2230806wmf.77.1553247187968; Fri, 22 Mar 2019 02:33:07 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:07 -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 v3 06/11] gc docs: fix formatting for "gc.writeCommitGraph" Date: Fri, 22 Mar 2019 10:32:37 +0100 Message-Id: <20190322093242.5508-7-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 Change the AsciiDoc formatting so that an example of "gc --auto" isn't rendered as "git-gc(1) --auto", but as "git gc --auto". This is consistent with the rest of the links and command examples in this documentation. The formatting I'm changing was initially introduced in d5d5d7b641 ("gc: automatically write commit-graph files", 2018-06-27). Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config/gc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/config/gc.txt b/Documentation/config/gc.txt index 3e7fc052d9..56918a5008 100644 --- a/Documentation/config/gc.txt +++ b/Documentation/config/gc.txt @@ -59,8 +59,8 @@ will also be excluded (this is the equivalent of running `git gc` with gc.writeCommitGraph:: If true, then gc will rewrite the commit-graph file when - linkgit:git-gc[1] is run. When using linkgit:git-gc[1] - '--auto' the commit-graph will be updated if housekeeping is + linkgit:git-gc[1] is run. When using `git gc --auto` + the commit-graph will be updated if housekeeping is required. Default is false. See linkgit:git-commit-graph[1] for details. From patchwork Fri Mar 22 09:32:38 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: 10865407 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 94B8B14DE for ; Fri, 22 Mar 2019 09:33:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CAFF2A63A for ; Fri, 22 Mar 2019 09:33:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7125A2A641; Fri, 22 Mar 2019 09:33:28 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI 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 4FF752A63C for ; Fri, 22 Mar 2019 09:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727952AbfCVJdN (ORCPT ); Fri, 22 Mar 2019 05:33:13 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37834 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727684AbfCVJdL (ORCPT ); Fri, 22 Mar 2019 05:33:11 -0400 Received: by mail-wr1-f67.google.com with SMTP id w10so1551122wrm.4 for ; Fri, 22 Mar 2019 02:33:10 -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=E0uGOOeq6lqgk2yhZXTZCkmWL5ihuzOqLpzfPyn8IQ4=; b=P2j7XZ4OajDOgIq5MMfcII9VZKqxzXLqOGVytshgaNK1kRdbEIKXQfIb3FDRJ7P3ay uZoMYQG+TUmu2i1S3rAMNEBg8MZdOCtWSiIlX1axoKyUCL/lrgcg3600Kx2Gc1QCbXjV KtCYnKjDWl9OzFxGqaI6AsqMlsSgQdtKkO1ii3r43Wlba1SDSn/vqjDkVyC94ZKUQEcU s8uk4WGiGb19Z5XVO+vdKjb3jaoJXj5/KPARjiJMDMY+1Yv5GNJuHVxIu6VmUAuc+hA6 +ZeVYiDcXFuvlHf1rlnWZhV1QzoYrLt7UBzPgKw6kkbZh0K3gswiBSJIyDB1vybH36MV PPCQ== 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=E0uGOOeq6lqgk2yhZXTZCkmWL5ihuzOqLpzfPyn8IQ4=; b=g/VsEM1NyshIXKb1yeP253AOxyy0XxQpEx8Hsb9PwvGi0eO+1/OyxS2uNbAI9p6Y8K G3EpFG0791VwzjXDcsyPpjIq27z97wfxvnLGJWkpNXoq4KqJhZjR/Bn37PLp2eFRtGU/ cJhP6xrlTty0GZu+sIFwIYsM5Du/XvGJZKLvrGJa0SDqbGhU/OUHjXrWhrS4dQIbGu7p yIB5dHDfG0wyN5o9tOk9kDDtN3NQH/yuZt20jrLCtBIxGC36UZBPq7ZDIWxU++ILbBr5 s1TSQLXsv+lBeScEdoGRIkrcQNZZP/5e0F0Y/NCQVBAlsSQFFTzVPpRkROn42JEp+BuW yVHQ== X-Gm-Message-State: APjAAAW1TPMezY4zT84QpeScIcJj0Hen5cWTnusYxJyHKFWcNRReCRN0 IfAY8a8zZBdWop1XtkVerslEofsrDBM= X-Google-Smtp-Source: APXvYqwNiw0OSKYnbooi+jv2S9nkN1O1kFRjgnAElVQtJbb+nu74KFNDv2F+lYIbzwLZtk2oz5+QWw== X-Received: by 2002:a5d:6b4a:: with SMTP id x10mr5554732wrw.63.1553247189049; Fri, 22 Mar 2019 02:33:09 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:08 -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 v3 07/11] gc docs: note how --aggressive impacts --window & --depth Date: Fri, 22 Mar 2019 10:32:38 +0100 Message-Id: <20190322093242.5508-8-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 56918a5008..f732fe5bfd 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 Fri Mar 22 09:32:39 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: 10865401 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 3371914DE for ; Fri, 22 Mar 2019 09:33:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19D742A64A for ; Fri, 22 Mar 2019 09:33:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E94B2A642; Fri, 22 Mar 2019 09:33: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 974402A642 for ; Fri, 22 Mar 2019 09:33:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbfCVJdS (ORCPT ); Fri, 22 Mar 2019 05:33:18 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42969 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727944AbfCVJdM (ORCPT ); Fri, 22 Mar 2019 05:33:12 -0400 Received: by mail-wr1-f67.google.com with SMTP id g3so1523955wrx.9 for ; Fri, 22 Mar 2019 02:33: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=yTTQxMmGI7f0QN1UVXgcYOBv68WULak0tHw22nssWfU=; b=jwv4w9rw9JfSezgLo9QNgGQgXyv+DK7Twd/yMurOTrUuxJCS7LkrtFgMjS+KBpsWl+ zhMvZDnghXRTuv2gkzkX0NO/oN71gpEY5aqHoGUAihz96z417zM4PiozLrZDxYHlDnYz yTr62nFrtXJRX8P7tmms4m4ZKm3IpUHEhoNxLsMGOAGF7vHoZw7BJHfhjMDOUTabRzKg XBXAsf3tTKJ+hDsVbeqCfGtSYGsVuOTB5fNlCAh8Ig4C4bcBoMYcXw1TB44f2DgOaajs pS8vnNHNQlO5leGp2uJBLTXn8hYn5I7s9m3BUE264wyzQUC+eX1tMpQmlRayDvQDnA5W Zicw== 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=yTTQxMmGI7f0QN1UVXgcYOBv68WULak0tHw22nssWfU=; b=L6XG8aeCyI7iwj3mDRGvjLndZFMOGjyF3N2Hwk4DNRgB0aabLMavuYjYqMyzyr66Ak nohL9nfLlkxMIvfxIIHv5vlRbup2MV2/9gm/tUsrTFu1pHMItEZnPK1mT/pB+KeHTMfy uiqU4Mla+blhFVxV0ygnkrhp1JcWlXR4y3WL6GI2rmTbXs6H/7rkEWfGKUBglenKT36x MQlXlFPlq3XEHZM1DplP7OneSiVivXu4xZ6iorhsIQuJ1MFz5vFFzitJrwTqnz7Ise7M URqq4EgjpwhgFhej3v9oJeemV97fW5GxnQmwJqcKx59f5tibzNX2F+9JfoG4m7QcfzIX 86gg== X-Gm-Message-State: APjAAAU0KItQu3wKBGU8WyI0DrgXgf2qq2+dSQmNa6lbTBme24NEDMBS Y+F5eQK21lxMuomRPq32m2mob6G8Njg= X-Google-Smtp-Source: APXvYqwChULFCaYOjVCwOLrbzyC0JMrkXr9Pp9+2CBakHFJ4Lmc5a6XmwBUGMNiAitNk0FqQRnXqXg== X-Received: by 2002:adf:f4c9:: with SMTP id h9mr2216607wrp.317.1553247190099; Fri, 22 Mar 2019 02:33:10 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33: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 v3 08/11] gc docs: downplay the usefulness of --aggressive Date: Fri, 22 Mar 2019 10:32:39 +0100 Message-Id: <20190322093242.5508-9-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 c037a46b09..165f05e999 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 Fri Mar 22 09:32:40 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: 10865405 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 5279D139A for ; Fri, 22 Mar 2019 09:33:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3953C2A645 for ; Fri, 22 Mar 2019 09:33:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D9802A641; Fri, 22 Mar 2019 09:33: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 C120A2A638 for ; Fri, 22 Mar 2019 09:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727954AbfCVJdR (ORCPT ); Fri, 22 Mar 2019 05:33:17 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54430 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727930AbfCVJdN (ORCPT ); Fri, 22 Mar 2019 05:33:13 -0400 Received: by mail-wm1-f67.google.com with SMTP id f3so1420672wmj.4 for ; Fri, 22 Mar 2019 02:33:12 -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=RobghbQQ2JiHyAayTAzfxX+asv88D8rTCoFN+TOadErvOFrH/gWCulerPQ6ey7h+SZ nFh7QxRBST4EmSR5OY1LmksfxIpSyLKx4iNmGJ3H8fKda7R02G2EnxUIciRgxYtj0Bav Kk5FFIUG6Nyg+BWpYvosiHlji5GsXzAgsBTSaTDD+IM7wvTnxYRN3OWUYbE2A1cDxzqi JYEdsvUNcovpd5YzkEewXDD+i1DGHnW1BzncH5sCcxXCQm6LTqc4/FUXdXl8PKNmFHmF DIXhDIS7pEcXsnexZBc6Gkn3RJDDUG2geJeAyVEiaaIpqh6G4Lo/UhG9qu5wzYNtRjR5 Rsmw== 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=P8aCgBMMRPldaNPWPF0oL5XyHzNzMLWAapFvlsUAxUJQoigjrLd3Zd6spORY7KwDi/ YpPH8D82uTgbfJTnOv7dqSgwIFjpQgXQ/EfKGyiCshwmFLq+M1XtzlUxMq6SzBDy9rNI X4MBPHKFJa7C+GNV0eTNiZ4KThLp55sqVB9Te0nUPFzPFN74n7lI0nJ05leOJ4oiR6m5 qbyZFOpUFp6wGxJQOCqhq69GPf5GrIG/vxs8rD8ovTmkQXHIzMbaPW8JIRfJkUC5Z/dY 3X00unUjtdEF5/+fLezoXx43CPZAwlKa0KILNfyPhStlzJKzr58WzWPyX7148PWF7lWr i6nQ== X-Gm-Message-State: APjAAAUDsOHP4HzXDA3m95EvMsARZiYj/y0XhfT5jmbfFgC/HQ5vRDyd Q8TuljEndxceoSAzKoI1Ey2WPoTaFlU= X-Google-Smtp-Source: APXvYqyTgWhe0jDAACJ2/Q19+kb/ovZgmhwaiU4dgxOEvhUKbNQTcXLqNA4/lIQaAm8o7+FwYEv6Rw== X-Received: by 2002:a7b:c5c3:: with SMTP id n3mr2418289wmk.82.1553247191133; Fri, 22 Mar 2019 02:33:11 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33:10 -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 v3 09/11] gc docs: note "gc --aggressive" in "fast-import" Date: Fri, 22 Mar 2019 10:32:40 +0100 Message-Id: <20190322093242.5508-10-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 Fri Mar 22 09:32:41 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: 10865399 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 04C19139A for ; Fri, 22 Mar 2019 09:33:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E156D2A63B for ; Fri, 22 Mar 2019 09:33:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D596F2A642; Fri, 22 Mar 2019 09:33: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 6C7A52A63B for ; Fri, 22 Mar 2019 09:33:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727957AbfCVJdR (ORCPT ); Fri, 22 Mar 2019 05:33:17 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41129 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727948AbfCVJdP (ORCPT ); Fri, 22 Mar 2019 05:33:15 -0400 Received: by mail-wr1-f68.google.com with SMTP id p1so1524524wrs.8 for ; Fri, 22 Mar 2019 02:33: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=hbz+ZQhaxAq9zBs8Z0B/DXRydlbJbw7ibhZnEiAJdjw=; b=MKa+uy+Dq6KWv3LMadx2aZjkzJWbBM2lAXd7Feey1uOvL689lpyrjpAyqnD964EzOx uZ64Ol9VTDhBMGDfUzP+05a0akoBuefgG/nFWjXcPe73M55bqJrESDNINDrwc8kuHOmn BFbTKP+8tJjcw/eURvcrD39Ga4Dt1Cofwu1UgeNkgx4q2IIaqOvM0mmJb9dmQiiIKNky 8rdhVCpV7DndUdm+YMpSXfmz0Zo01n2r9Rfom2Ch2w5Wv7geBd8W3/upT1DG2fNdyJUq 6+skLJYpcZ/6g2BqN/ag+0lywqXc8j3baoZ0amaYOYx/2cs31xMEFLhzaLzGvQAvFbsx 1Eig== 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=hbz+ZQhaxAq9zBs8Z0B/DXRydlbJbw7ibhZnEiAJdjw=; b=ZSvWOgvDZCx9ybOVW/xTKLU0fRs8/J0uGpVW6P1MifMsG3vLdJmtGKm1U37+dbnFAr 1g0+a7VCJHVPf2yz+dJBeh55+dX48rD/ScesxazgTbXgT+B7ZFGteJfeiRDNwaVRksdu uJQ6J7doIejsZoYa3oLks8Jn5cwy2dzC+qjAuz4ggvNZOFudXtUOC4yeUY+otGvECs0A ystmI0QdyUiT717FflTS0K2hUTs8wH8kBlz5S2Jbrk73NQHSvM1PawJiN2sJA48V7lll XvjdNiuJzitgl4Z1FK1OKGQd+HrGgj/DhWuzuZ5yH1gZOp0pCFaTqlk58Ueq9uoKf4dv Q2Cg== X-Gm-Message-State: APjAAAVlvAbe1LLVLjg+z7VWi53EHVouF+bgPJ65D7+HDu6L8RcetEyv D3pP+AMMcDPSQUJQGvfuG74RNkBk4Cw= X-Google-Smtp-Source: APXvYqzNZr/9MT2Jz7BeuZXSX6rEzFp+SFN17/I9yfDXoFqeVZQNWfW8qsaoUO6O2Z2apRvmTAqVgg== X-Received: by 2002:a5d:4a8a:: with SMTP id o10mr5678427wrq.189.1553247192596; Fri, 22 Mar 2019 02:33:12 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33: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 v3 10/11] gc docs: clarify that "gc" doesn't throw away referenced objects Date: Fri, 22 Mar 2019 10:32:41 +0100 Message-Id: <20190322093242.5508-11-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 165f05e999..49aec5435b 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 Fri Mar 22 09:32:42 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: 10865403 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 A551615AC for ; Fri, 22 Mar 2019 09:33:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D50C2A64A for ; Fri, 22 Mar 2019 09:33:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81B292A641; Fri, 22 Mar 2019 09:33: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 2D26A2A640 for ; Fri, 22 Mar 2019 09:33:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727961AbfCVJdR (ORCPT ); Fri, 22 Mar 2019 05:33:17 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53385 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727684AbfCVJdQ (ORCPT ); Fri, 22 Mar 2019 05:33:16 -0400 Received: by mail-wm1-f68.google.com with SMTP id q16so1418593wmj.3 for ; Fri, 22 Mar 2019 02:33:14 -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=8rgI6yxKGMPqEI7PNifLp7tOQA/X7/mI8l/sGLVPHjs=; b=LMbNbRPA9ByQQpmb1EFuQoMNxco2GBDTgovR1SjeUBEXvu9C2Agfy9uwY0oDCD7Fwu Cbdh6zLAwrqM1NlIDJSm35/0yj4xxRtbisFWHL2KOrYZXCG9NVtgYue23cyUs+hU/2Vs LtN1IhczQaoav1l28+J6/YoGYUut7I9Iv3dxdLcAzMEMiaEYOZSgu9TRwGhxQVNutevc laBYO3HpshiS4/9po5gZ25kvDEoSWSwK7j17+0AvUe2ughF5ykmoW/HmMXYa4Dn0IVJd KHwO/W2iRsdutflHXawIaHaIR/gWv1Q6wtlh8OqS9FcZ/BZdY8DzEBhn164Dw/uK4g7E yQvQ== 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=8rgI6yxKGMPqEI7PNifLp7tOQA/X7/mI8l/sGLVPHjs=; b=rx0TZkL5kzyFSkbsrLTGGizG3G1O7TZRWJwIWfFlVgNLKhVgGsL/zgQEEyZIzd5+R8 B0pemTcvMmFQSVzFbLnLogrtufcEhl8Gib8mjXXXYLSf5Hb4oT9adriWTqLrunTHe9Hy nzz1San7SxKePD1yF0D/Agd38KlxSqSwMa7tBZzgDeac9AlnbIcNPvt2bmr8DJJiYXIB KMHhuMKlH5LwaCfJY1buYy0CCfLy7Mwxx5KfnCflV2o5C9KdPQ6XS9PRLxIunIbgPmIJ qmKK6MU6kHyl1DL0qJlbAKz8nFxByKPIqgKzmI279o5FfnRvi8O4B/8W9TBXsFrFuwQX GgIQ== X-Gm-Message-State: APjAAAVeY0uTtqqsFwn1uyiawd7k/o6TC6LzXYJPpLLAjfXJGX/SD9e1 SSpmU91jkz5tkjdFaNyBJwx/BOMcCKI= X-Google-Smtp-Source: APXvYqzmwG6j74yfwCClb4fF4ttykh6MHrqif52M37BO7jEzpWkFC0eV4v+N5Z2/dJgQUaAgiE2WFA== X-Received: by 2002:a1c:4105:: with SMTP id o5mr2422279wma.35.1553247193698; Fri, 22 Mar 2019 02:33:13 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id y197sm3521447wmd.34.2019.03.22.02.33.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 02:33: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 v3 11/11] gc docs: remove incorrect reference to gc.auto=0 Date: Fri, 22 Mar 2019 10:32:42 +0100 Message-Id: <20190322093242.5508-12-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.360.g471c308f928 In-Reply-To: <20190321205054.17109-1-avarab@gmail.com> References: <20190321205054.17109-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 49aec5435b..2af503bdb1 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 -----