From patchwork Sun Apr 7 19:52:07 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: 10888617 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 DC2B9139A for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAAF3285A6 for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7F5E2865F; Sun, 7 Apr 2019 19:52:57 +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 45A6C285C6 for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbfDGTwk (ORCPT ); Sun, 7 Apr 2019 15:52:40 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51721 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbfDGTwj (ORCPT ); Sun, 7 Apr 2019 15:52:39 -0400 Received: by mail-wm1-f65.google.com with SMTP id 4so11910918wmf.1 for ; Sun, 07 Apr 2019 12:52:38 -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=o/A8XOkySTNrBhJOhhzMmwfo0SaDP8OPiDWiZmHqW5s=; b=YYkNXXFrLTPbG9AWgm/Flwu9aujIAz9L3zE9CCjM6F7K/1WDWAAsxNe1CGdWMh+6z+ W/xZU1+/lVUwXG8tOtrazfHtPSxrHMnGtcGZHjHN6w04bkbeoMTZmBJgMknxV+RJJari KnYhwK5AIPlHyFlImZt9Xign+rqhByikSDxLz42LGQ77XM5lvDk00ZtBA++UsqtdISVP fD+7PGEW+WYEKzPC3Gr5C7EPXEt56b+YyA3RT0C8xfSGsXVxo3F2ySNBZH39eyqqEemB afBj0qFKFz8QU8Ains41y8/X7VfJjvgXZTfAv4hJAIaeJCNVKoo+OjXbMwR3dugHyBD2 d98w== 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=o/A8XOkySTNrBhJOhhzMmwfo0SaDP8OPiDWiZmHqW5s=; b=a1VXvWWBar390fUs7CMaGK10LddUbFVzmsbJgjIIlu32ZjcbqG290+8RPfZs2PFUB2 4QCn17Qa/w76toTfuuvmeg46v15Re+WpIPW5cpeFhDu9tw2IdCR8MTeEdoxOtEYFRt89 17PNB47DQIR3FqjnVCo3ZILZM2vjuAXXmkO5mbxbLS9Bu8C1uazDnnw7sm+rVE8xBB4h 6gXdqiBcbZgDRDE9c4LqWGXH+Ny/HROjFnuVPXaT218GP8yrxVXyzI1zpmtxK8djHrB1 YQMbjminOhly3S+dG4LZtHyWeP1RZ/Fz1tulisSftRiMnEl3uZrVit+gzmJ9Zk23eRJe MWJw== X-Gm-Message-State: APjAAAWJfYTyhKh/S8oRnEFfEZ2ZIr+WpFkp572RMTn5M+4V03L54Y88 CALvpmWHN4rAzrlkS+g2dgSILFNi X-Google-Smtp-Source: APXvYqydmkdPshPFsqR+UPwmSvEooSlClJ8ETWZWPBqgLrLIK1unX+LKwxOMSJ7zIJVTdc5PfvON4w== X-Received: by 2002:a1c:988d:: with SMTP id a135mr16128070wme.24.1554666757519; Sun, 07 Apr 2019 12:52:37 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:36 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 01/11] gc docs: modernize the advice for manually running "gc" Date: Sun, 7 Apr 2019 21:52:07 +0200 Message-Id: <20190407195217.3607-2-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 Sun Apr 7 19:52:08 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: 10888619 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 18A0A188E for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0115C28653 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E98362863C; Sun, 7 Apr 2019 19:52:57 +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 6629B28620 for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbfDGTwl (ORCPT ); Sun, 7 Apr 2019 15:52:41 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34360 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbfDGTwl (ORCPT ); Sun, 7 Apr 2019 15:52:41 -0400 Received: by mail-wr1-f65.google.com with SMTP id p10so13867378wrq.1 for ; Sun, 07 Apr 2019 12:52:40 -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=ZS9CqQWCd0ef1TG4R/YHUa/z7JHJOFvfGolVnJBi6uI=; b=cpsJ+hVo5NQkTK8oEgj76FBhwhMr1LWXsav9bjZ3ZD3/jczJcrmTRwWgJ0e5yyKzJa co4oz5z7M+pXnenJgbnj47aAxR6x1FmwMR0cVyzceb9OA1y3D2TQfgwiSHkVU1h3FdI/ oMacc0836GzIfzu6Ldmv5V3k6IAWccVNUcR38nqy9ENVB/IHkZbEj3Y/UrJwcY0ckXFY 0ZM7Ff7ZhYiJCkEqzgsnbLlIV4rZy/1hx3x+7+uyM5cGl8AKKyUFozpUuqVvQBLZFVyh Dej5nI64shOIndCCSx64e1T2Q2n5Qrr9gy3Do+fSS+b33fZzIJ4Cn5MPXwHC3iNn2fBK zhDg== 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=ZS9CqQWCd0ef1TG4R/YHUa/z7JHJOFvfGolVnJBi6uI=; b=XrTFSHwvi1dY7jXGMoIy2P3Ekb6XLpzbSyWdmMrteZj/iG3b+Hiz/g0EzLfsIgYydY dRMJGAsCMEfvdj8Us/tkQEUJZLn4DnPm72ZGfedd1kkuRoNSycV3M0jZdRRsX8h3pnzV YqdgqKd6h7FcK4PkCaoUrzbj6HEihCVQQTwaTJdkjOwxvkKJC15TSlcelQpZVzq8gC+G JVtnNeGQPcAMACHQKHe+ciWW4yY6BLDM32VK2FIHB1P9EtCIrJco/Oasj055QMxszDM5 vtmA0ThVHBDl5Qmxa9P+pxrTgFAA4jwstBbFvdf09hXMtVymyFAk7PxbrGeq7rXRQ6+r gURw== X-Gm-Message-State: APjAAAVL29POWcVa2lBM65vNpFhsrIAk8k0hXvwdJtfpPmMwDTBRJ4Fm AUIkynYOgEQOQxWq1Sog9Nx2FxcH X-Google-Smtp-Source: APXvYqzaoehavik2pbDfYvkHeSpGFgSRohEJzk498UC8KIUuuSQydW9AzYNo/QTAl310HHGmck25lw== X-Received: by 2002:a5d:6a89:: with SMTP id s9mr6970100wru.58.1554666758980; Sun, 07 Apr 2019 12:52:38 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.38 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:38 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 02/11] gc docs: stop noting "repack" flags Date: Sun, 7 Apr 2019 21:52:08 +0200 Message-Id: <20190407195217.3607-3-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 Sun Apr 7 19:52:09 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: 10888621 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 3284213B5 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C34C2863C for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10DD02866C; Sun, 7 Apr 2019 19:52:58 +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 905B128640 for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726465AbfDGTwm (ORCPT ); Sun, 7 Apr 2019 15:52:42 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42894 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbfDGTwl (ORCPT ); Sun, 7 Apr 2019 15:52:41 -0400 Received: by mail-wr1-f68.google.com with SMTP id g3so13801914wrx.9 for ; Sun, 07 Apr 2019 12:52:40 -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=9rv0YnLxyRpkCQGuIDpJ1CuA4iztjW/Axkpa/KLUPgk=; b=hW/mmZPd3ioubConzDD8fFyPjGOeYNKH61gobNBudhx+1UNEsV7MG5NhyedB9P5MEu J8VdjXM/IlS++rJgTlC20LzKPYN/sDYX2nANeeSjF8ZLBlPYM1DfAEE8/ujCXoSTN9N7 s40PYrG5UO9WhNLVNKuXrxgtVCdCx0CMuyM0mUOUT8tIpatmexuKVFW4aaIonX+A3lNq Khy7Jk1JtkW8oIPlM0yBSWJQqo3mQWpoTT7vZ+w0ATrpbY3ZF47OCChDVONBFcxAFlaB jtDoFJI7SPD/5Jy57vGpJ4S8et9NdVv4IF6tD2NhBPNVOvDSUcP+F94F10N6qCXVAvua pWMA== 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=9rv0YnLxyRpkCQGuIDpJ1CuA4iztjW/Axkpa/KLUPgk=; b=ao/QTkRrUt349b1KVCmsbC6LJkladq9mjzkrIwEUgK9IRKsk8t8TX0qri1EvCcS51S L3Op+Hhkb4RmZ2WkwxGjTShcO2X+jmYhuDdlGTlx0UNqzv41+mUJrarMl9bduGOlx6w9 Qf+BhywrxgD/Cq/sabX7o/L8X2quAN4sg9qTlx1mbOjgmoECBQFyEfwptV8qPNF4ImwT cyXuHIiszFCdXgmdjDeJtjk9RngbYsUMpWXuZF8ux1+mUrHPh+aldrzivcp21rtlqyqR nIVh1VoQXk5XY1HsG9TgV5FpR+ctMi1PIL0Ps5OJ6Jz0nFc2VymRkZtKDOq9gALdmLDj wdHQ== X-Gm-Message-State: APjAAAVA3h17HZa7YY/J93ElWgcRzpiQK7eqmhdYqrm5L4v74aXtQ0/i mS67VytKOTJTMyq0goOjBWAiEN5I X-Google-Smtp-Source: APXvYqzrhshkRtHtdb2mPxgkQ4bemzKhCZmjJ4TVXujUIPrNdw/fMmIgTGq5GnYG58OVeaxQzIRoeQ== X-Received: by 2002:adf:f344:: with SMTP id e4mr17260865wrp.77.1554666759946; Sun, 07 Apr 2019 12:52:39 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:39 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 03/11] gc docs: clean grammar for "gc.bigPackThreshold" Date: Sun, 7 Apr 2019 21:52:09 +0200 Message-Id: <20190407195217.3607-4-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 Sun Apr 7 19:52:10 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: 10888635 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 9C3E048C0 for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8229F285A6 for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7658228640; Sun, 7 Apr 2019 19:52:59 +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 B2FA8285C6 for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbfDGTwp (ORCPT ); Sun, 7 Apr 2019 15:52:45 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43481 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfDGTwo (ORCPT ); Sun, 7 Apr 2019 15:52:44 -0400 Received: by mail-wr1-f65.google.com with SMTP id k17so13799030wrx.10 for ; Sun, 07 Apr 2019 12:52:42 -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=ImjBqdQPIf5efADZEN4s3l8V6OtfX4hnKQrCFngOM9A=; b=ZA05Gm5VmUJew50y3Spu5f/DqleM0R24EQna5jac/VmElxXBWyoAQFadQt6woa1ui+ lrhRUybVEE8kYhZh2NSsNOPam+pp3LrIGzZw6cfNn57uYmlOUfAaMz0CsZwcawxArwHn EBMABc9DxLvLbznWfpG5MH8Mx03rcSVsu41LSGjpq9HbmT3nwxvbdTntztBqc2/4WnGE pmwKo2D9lJC1+o9EixWuKYxiEJr7EzrjwPVDPVAduyFyNz9/xwrci/9RvtUIXprNdSIy wDKPTRu5Cs+iIYiJkCK2OGrpUgrjQKFjXb6NfRkNB39e1p16AgSFI0jSv9DnCf7Fsor1 WtIA== 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=ImjBqdQPIf5efADZEN4s3l8V6OtfX4hnKQrCFngOM9A=; b=EzkwjYUhgZCwULKSLvtTBap1Gra8LhuJyUHiycOH+0PY/jUGCTxgLn5vNEpYmTiaH5 S7XeOr0uZVxAvClc1xVMornF/J5pQN2v9QacAhEwPl16c5P9NNaGpeqCpR2HLoohUnjg ai23lrWe76VnDn68frnRjWrj/C31fAXbtMKKCO95U3/j4A6Rhzf09R347simMnzwvokI cgtRq3u5ZIKgCKS5COp3c0D//PP2ZxKWw1XA3c99/EKI7iUyKutdji2at8X4fOEEIx0N 5HQC0dqsV0/Dk/2PDFZHP2x9hPTL4Mce2m7myioAFeUj9Ls6v+29U/IvOvZV8YFdRFed TH3w== X-Gm-Message-State: APjAAAWfQu2Ko536kZ2rJc/Ej//qjNXXZ5Z1m2bJm401zA0SIE40J+Ey ERswZ2T2PZylNMELEJ+UFIfbO7O1 X-Google-Smtp-Source: APXvYqwOdLY/wsXqMm5bHocplC2jEGLAiiRA0H2IEP9gcJmlEUXW9p8W7LwTtO+c59V5ckCRYIA4iQ== X-Received: by 2002:a5d:63c5:: with SMTP id c5mr16776461wrw.82.1554666761365; Sun, 07 Apr 2019 12:52:41 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:40 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 04/11] gc docs: include the "gc.*" section from "config" in "gc" Date: Sun, 7 Apr 2019 21:52:10 +0200 Message-Id: <20190407195217.3607-5-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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..37c4d26a76 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 Sun Apr 7 19:52:11 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: 10888633 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 36FB5139A for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 213AD28672 for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15C6428681; Sun, 7 Apr 2019 19:52:59 +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 D3E4828676 for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbfDGTwp (ORCPT ); Sun, 7 Apr 2019 15:52:45 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33528 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbfDGTwo (ORCPT ); Sun, 7 Apr 2019 15:52:44 -0400 Received: by mail-wr1-f68.google.com with SMTP id q1so13871825wrp.0 for ; Sun, 07 Apr 2019 12:52:43 -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=AaTauwKkVFivjx3/WKqbYHYkQv9/qpLAgnujxe8DuB8=; b=QezNQcR/uS/6zoVD4NXZG5EdOdPUm2S6sAIxqntXxdIyyQNF8Nq5yycq7nB5fm8tx7 VqgE9cYym5xDCDn8+KZnSykDNDUyjguELREqhDk7X4QCltzovUsM6FpUK2Op5mPnL4b4 67uf0jXNSq9taFQG15ik59Nknszu66G+Gb5EtwwVNJQFVbVWutWPtuQYAFkK7YfXTD8S 2OKDkr/zni5bj8xld8S9fAJglGfL0Um2uh1PA/an11IaR5hKE+7pdzR2pKDGacsMd8ZR YvpzTUaxeFFv8T+BzDEep8tbHtXtcZ6ZWEZMgL/i5RKA15YrMycyUHndifoKkG+cg+UQ QwsA== 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=AaTauwKkVFivjx3/WKqbYHYkQv9/qpLAgnujxe8DuB8=; b=o3aJe+DAHd+6xXW4Mdsk+fBuoTLAAwFQ+lkcGeKrJQh5fE9osg1vH5UNs7wvNs9LJE ZxUYKkhRqNcWcTGINz7zYMjFn0xDQoJKK8M1t5meeeJOykCY3dJqQYi/jBGMm06YTuRo dwfKBP2bj31Rtbw3TY4cDYBwtQ01SyQTdnIgZrgv6isheN2XNZnd5mtty+kwqr3GbB7H xvgUZtFz0YAknoVDq+Ouq+4ulJ2GZkNTQ86JL8dlUZOyl2awMYdL7g3Jd4Z5gTZijgtx CMP8yBbVSQ5dVinIu8GL7L9qswVPDZJ6g+l5r5U3oQ5icoyzsOUeepVKZ5q4LP/nJ3SH FrDQ== X-Gm-Message-State: APjAAAU/uUK1whWmnokFxtDRZyx6cgABECRFLC+h6h+D+g8WERjYnqfq 3ih75Li+uMeImUcoCftjqKmzbVfScnk= X-Google-Smtp-Source: APXvYqyh6vXVDymsTIfMEWbpGn9wPpvlQ9plBah9GKR8vWZ7Mk3rAk4s8fzhUs+90ZbiZwudNNk3eA== X-Received: by 2002:adf:efc3:: with SMTP id i3mr16302335wrp.92.1554666762471; Sun, 07 Apr 2019 12:52:42 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:41 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 05/11] gc docs: re-flow the "gc.*" section in "config" Date: Sun, 7 Apr 2019 21:52:11 +0200 Message-Id: <20190407195217.3607-6-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 Sun Apr 7 19:52:12 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: 10888623 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 8392E48C0 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F03B2865F for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 627DD2867C; Sun, 7 Apr 2019 19:52:58 +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 0016B28620 for ; Sun, 7 Apr 2019 19:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726493AbfDGTwq (ORCPT ); Sun, 7 Apr 2019 15:52:46 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45805 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbfDGTwq (ORCPT ); Sun, 7 Apr 2019 15:52:46 -0400 Received: by mail-wr1-f68.google.com with SMTP id s15so13780504wra.12 for ; Sun, 07 Apr 2019 12:52:44 -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=NW4+opDdVu/9LRVIoTSM3VkGGEWZL0ek6J24n40cdfY=; b=N10BnWZa1ZgGvKb8xkDxF/fxx7cqfuB4tMc8Y945CUO6DICA8RZEVoIjcHR1OxwLUC G2ok+jPKBsoM3frpWVheyZ24/kK6gZxUaWIkxOUXd588kT7aX24/e5ld/eEzgIjO2CeT wR1pSuQd2c5q5aKJ4qVywnN5Iy+X4im/i25etbIVESV8mwAB2o/2RWlqNQfc7lZ5c0R5 N8ZD89o8lG0zDeHdEdrDJx1wBATO+80DbRoire+ZJC5NWwVWsBYBIH+ty/30nFlmdfbQ jBilVo+XLmI1zO+/6r9GWPQ5lqlITs8I0eFBNyyJijWz4BGbZwhdOvxqfNgsoN9xsrrL DalQ== 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=NW4+opDdVu/9LRVIoTSM3VkGGEWZL0ek6J24n40cdfY=; b=nS5t5j4yw+Z+0XLp/74G1P5vYZU4ULUlZJ4A88kEMD+3LUzLnKKDXLrxRvIQQniycE 6+kVfTcXp+WQfTBeSw8mExV5c7CcXa2gNvcih45pukrJYUeZ8shD73vroHBL29nlNPQi +5eRdzcnW0UwMO2lSF8OkLcCOMHrBTnPvjtkBX+19RpCLnWIth2EekBBXb2SonJI/a1C 8+BVTOZnk8PknGNp7KJlD0KFhXbzli/vJ/oEUlg2NKYbe0ZA3B0M74DobyiYzCERWoK4 siv5Cls/oREs8brdXnIut+IxtEY5yoKofAfUCW2uuO2qp896Hoe4yRQnufokasDwZ06T xJ+g== X-Gm-Message-State: APjAAAVk+Dkx92CfGRTEof56vC/H4hWdJId82ERC/H4kz1Az0Z7cRCs3 Q0ptnRsSFISBe12VtHRm5w08jK3XMKI= X-Google-Smtp-Source: APXvYqzhLHX90n80vnT9078gKQu8E0oEreLB//YIGUT+LMNlmssu+rbT0ddfVP8O2bxxUyi6jkTBPQ== X-Received: by 2002:adf:f607:: with SMTP id t7mr16927327wrp.191.1554666763971; Sun, 07 Apr 2019 12:52:43 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.42 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:42 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 06/11] gc docs: fix formatting for "gc.writeCommitGraph" Date: Sun, 7 Apr 2019 21:52:12 +0200 Message-Id: <20190407195217.3607-7-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 Sun Apr 7 19:52:13 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: 10888625 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 A0EC818FD for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B8BD28653 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8046F28681; Sun, 7 Apr 2019 19:52:58 +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 204F328653 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbfDGTws (ORCPT ); Sun, 7 Apr 2019 15:52:48 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44730 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfDGTwr (ORCPT ); Sun, 7 Apr 2019 15:52:47 -0400 Received: by mail-wr1-f65.google.com with SMTP id y7so13796144wrn.11 for ; Sun, 07 Apr 2019 12:52:45 -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=+QZZxuA1szXKbodDI1ZS7sUwGQUn86iFE2+GzZpUnNM=; b=ffCOLZaF+fOFCSRGZhFHbuk7O2ns2gvW7h0yMKrVz0vDAwXQ3vcwb83uHAeUNt7TfL MPkGavIySWgZc/rODQ+l1I5jOkBEVLB6gpOi5/OYphO1MQbG4yS+by49D+tC1GSHD/Bf hUdbcw+Ux0e117a7jb9O2wtP0s4mV1F3W8jeVU7xJl6AZ17GiI/IbuPmYS622p9zjmUH cc0U2UZHljAzl5viI9xW+G7hg7gkYv7xaLtwAwZtAfo4eSNebHiA1T5+tFc91bkP3/Yy 3//Msy4E2/r7LVen2ev0m8TiTc3jkRSERdlkhoKy8GNJAbUYJQ3LCsgw6sW7EMLGGyXJ /XrQ== 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=+QZZxuA1szXKbodDI1ZS7sUwGQUn86iFE2+GzZpUnNM=; b=H3et2ZZC8K8JqR0SDmt62Nw6z6nBGphlss1Yv70oC6WBFOSBPLocg/Ju57rFR+J0rJ DuLpIgT+TjX/371+h50JMZ+Z1f+++cgp9zfUl7KiqOS7pjVM/M7LKZdsc22Y9e/S6Bg6 PIbjKUYwpD5kXPWOJ0fdcrVNROvZfYVXvP4vD8Og1dISx4jLm8uofk0KCrtLuhnAGTt7 Tdz7wi8PUtP4diX3H6oOTUeALuGQ4pOD1q2aQrxz8DTo08hW5zquMpi+7fEztn+y1Q9x UZbNTKlhp+38uVmFkW05g/bQciVS7X65KEyWmNX8SCSK4HyRA2jbSjc1ZCa5DeKENURz 3qYg== X-Gm-Message-State: APjAAAVw5QRA37NcznXWt9deP8nutfzTNQTy4c9sY2/VAu5BeXfiuw+9 DBhFoxuYgrZsmcinwL9HBv8RmdY4uZ4= X-Google-Smtp-Source: APXvYqwQ2t4ujku+IibT0IOb/BC2B1bt454iPLjKEquXKirMhmhAoVkPppZennsR07RW2Y0kJ56TCQ== X-Received: by 2002:adf:f7c2:: with SMTP id a2mr15028170wrq.242.1554666765043; Sun, 07 Apr 2019 12:52:45 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:44 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 07/11] gc docs: note how --aggressive impacts --window & --depth Date: Sun, 7 Apr 2019 21:52:13 +0200 Message-Id: <20190407195217.3607-8-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 Sun Apr 7 19:52:14 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: 10888629 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 00D5B13B5 for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF87B28653 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D40662867C; Sun, 7 Apr 2019 19:52:58 +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 6224128672 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbfDGTwv (ORCPT ); Sun, 7 Apr 2019 15:52:51 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34809 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbfDGTws (ORCPT ); Sun, 7 Apr 2019 15:52:48 -0400 Received: by mail-wm1-f67.google.com with SMTP id r186so13681193wmf.1 for ; Sun, 07 Apr 2019 12:52:47 -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=Z+IpTTkNwfSkvettm3Bzi8sNFtULOkYZCCkjUQUhHcQ=; b=HCI9fHQLdlWQKJ2BjeSjRAvu7le6tv5IR2QE1H2eJXItKClzne/JgtJier8QovRUiM A3QetDEAjofWxWkKMGuFcijVlHYQxLpaa/pg3qcyQCQvUTIlxrwgnxh0mcJI4XIfVo8Z Zieq/AioTd5LyRyQ82zcFvF2+AUjuRjkT2goY1l1dSKJT1PRF5uwK3cx53Tc/0YBAU/F m+LNmSPZXXsQE//HDbKblViVQuNAno14YpRw4rwFCfFxncGAzRnjF822esk06LnIYRHs SpUo/Ki4zTTDQUsIsYettMKsMA1drYBbiHaLatcBgGaOWAF20OCM+VXPywL3upORMDe1 GO4A== 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=Z+IpTTkNwfSkvettm3Bzi8sNFtULOkYZCCkjUQUhHcQ=; b=daafcAGqlHsglqlOkp3gYSbzeRDvHk3lAAxKxwXQLdyqLCk428rsmEMO01hOt/UkjQ mI6EuTRpxAfewTQlr2in2hiUY/DfVKbggF8wtOcW7icI5ErEr+Mq8O2jUdeYgxdAMTwf CSmM53oFdccAoAOCpQOkozoJE5RZCyEmNQfJkqIGAZHHwb6h0pczo22plw257ZJ8EQAr 3rbBBRgCR5uKDveM/xCMto4EMqIqJJqAkPy254/Ryt9LVKmzUOO5JqGCT25rimRhFcqf E6SO1Qbn/q6r0T2MVC1ab3bYwBOCVvaN7aDsbhZy08AhJHRl6Ztr2JYP2XKujYpp4yXO pKwQ== X-Gm-Message-State: APjAAAXzwrhr7nW3/c/m1tdk5/r7xCqH/CS/Vxhsg0boE+BogAQOoVPq flSmpsITvdgRG+57lECvDtz+ExZXuok= X-Google-Smtp-Source: APXvYqzvzL9VinoB8u0VuZbCgUg0xJZ5VRt/H510JeAj0HNYW55ERYtEecyqU99sxTrLd+8r/7Mzvg== X-Received: by 2002:a1c:7a03:: with SMTP id v3mr15935604wmc.58.1554666766478; Sun, 07 Apr 2019 12:52:46 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:45 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 08/11] gc docs: downplay the usefulness of --aggressive Date: Sun, 7 Apr 2019 21:52:14 +0200 Message-Id: <20190407195217.3607-9-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 37c4d26a76..5e80f306e7 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 Sun Apr 7 19:52:15 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: 10888627 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 C233B4B7E for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC54128653 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0CC028680; Sun, 7 Apr 2019 19:52:58 +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 409A3285A6 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbfDGTwv (ORCPT ); Sun, 7 Apr 2019 15:52:51 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36956 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbfDGTwt (ORCPT ); Sun, 7 Apr 2019 15:52:49 -0400 Received: by mail-wm1-f66.google.com with SMTP id v14so12389467wmf.2 for ; Sun, 07 Apr 2019 12:52:48 -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=L+8KT0rRI3Y/uas5bEm2ecBWz03t+5nnF7RAFwHcIdA=; b=IjuOLe6AIGQXO1Y4LDL75YF/n/z837PoLfN+QNHwkLTNagA46H+SVVM5U5wveIGga2 5HbcEFCZry4Rl0PZSSUGqqSADlU0xShNIVZ28tyWSNh2F4vGDXfVuR14i6xu+9NkTJEy zj459w0idqza209N2NHGsVkHiR3BFVcX33wuhVTjoxspsj+3Xo/s9/gxTunr8HniQ5bG lka6HUxqB52BBGHGoTnjgJd+izxlHAv+RkY9U1tJXroRasVPQs7L0KL6EjmdU/pTdFE+ iIdUazxoEV7CAiax4Z9dLa7MaHyMRfpbHEQohOywOhVi2yOaro3/A15Ek98PAFKi3Roj QRRA== 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=L+8KT0rRI3Y/uas5bEm2ecBWz03t+5nnF7RAFwHcIdA=; b=ggdK1ElY5DgMqoA3hD3uSlSvoptvGVSnmqm5KDqKDPsxodjlp5UxUHJi1tLFuar2r3 4GWRRORNFfEG8d42afvKAdNrBe/LP/ryOHRtJXWdgNOD+85bMFVJ34KKFiXsqA8NziQN dGi1CnFcnjJANudVmVr7HsWlWokxamuhEpsOz4vx1LDgqsV9wTHY+NjTLKjxVrTyp656 hN9Uackdxu6BOtW/7SbiwsvD/WjFjjHnJayQuqP5+XxauxPLKm+gN7BHCrBf1Q2UGEeN iQScUaJQ18O2xCA2HG3Tio1Q22Xbjq50l4bKsvUBs++VuRUyY1N5b+cfEA1N2kZ3Svpv acrQ== X-Gm-Message-State: APjAAAXp+1QwPiRTeU8jf6qyaIx4gtPjnYmuT5e0AXeG1DvrDocxdli8 ADwev1NVCMhtDN30OcGK0ko9YaG3RSg= X-Google-Smtp-Source: APXvYqw0ecLobl/QNck5BpCOetHMB00USQ32EC+TUIEOguQdxclyvShzms9OJfbYoSUVeRv1YkXbzw== X-Received: by 2002:a1c:dc43:: with SMTP id t64mr16023984wmg.19.1554666767617; Sun, 07 Apr 2019 12:52:47 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:46 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 09/11] gc docs: note "gc --aggressive" in "fast-import" Date: Sun, 7 Apr 2019 21:52:15 +0200 Message-Id: <20190407195217.3607-10-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 Sun Apr 7 19:52:16 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: 10888637 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 D534A13B5 for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0E51285A6 for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5183285C6; Sun, 7 Apr 2019 19:52:59 +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 834E828620 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbfDGTww (ORCPT ); Sun, 7 Apr 2019 15:52:52 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45810 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfDGTwu (ORCPT ); Sun, 7 Apr 2019 15:52:50 -0400 Received: by mail-wr1-f68.google.com with SMTP id s15so13780662wra.12 for ; Sun, 07 Apr 2019 12:52:49 -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=Pp4QPzf0VOiKQIkDqRZYZIjgltqozRjq4Vpk/xtCVuA=; b=mFFf3kRia3snNVMUokF8discwNd9fDKVQeOOZErgvSRq8o/Q66337pexAMhVE5dh+h jxyFbZfK0+y5coE+YZ4jSLspiTPE9re2a0SbMBoPrA7uxZ3oSJr5/jiOJIi2AvtOmFCU gneVw8RXkw/ZdWKtKQ01gEbhaY6sys3cigKKETcQB4wX9R/WX6kMEGzMInNNGhFs2XN6 iwz169Jj0fDgsfj4cfO5mNM2KEXEdDr9P9/l4H4P0EjaqGJF5AaL+loQULV+/6WtXLwr AQW/c7ZMC2L2X/Xt0FkcgBLWDaKvpdnued4L36GG7WKVTtP7wCV9hO3Xr1FbuyDs8gFW a8pQ== 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=Pp4QPzf0VOiKQIkDqRZYZIjgltqozRjq4Vpk/xtCVuA=; b=bcaVaE3lCLWY01WPQfnJqT/jvtg0gaKlws/Oq/Fo0Vfqtcq0nuUcnGP+E+93mySfwt GIwOk7Sn7H2P+p/Rmb6Mec1azbuWqoXYY81/x9hVpxxGq5oBFJYOOwfv80hxBFvirnL6 KUu2zGFA/YM/6bSt8XznuE12zJWuKQN6kl4NI9M9ij7/iFrBGa+p19TmNHNu/3iSwrkq iOZcivSVGbiKfaZLklEtfzRANYatEx+IdrJGSq71H4XzMvSjyabM0Y4E/PIY8vk158t2 RZCVZJV5UaxSMIrH1bczf5hdAaKyxiX0f/+JYd9pr1sgeU4j8rbrKKz6VXafXVTGW2Ok /hAA== X-Gm-Message-State: APjAAAXjHsVlSll5ss/LecGv2ibsBJPCPLd2u6b6NBsfgNmfy0vng5mm VOgF7IEcxxaOYQtLWqIU3okgMuUmfx4= X-Google-Smtp-Source: APXvYqwgkrJTLzH1HHs4qR8XpgI4dSQUMs50YC8rtZrEWLqt5hH/yE7dfKv6h+aon5N+TOw7PVAAVQ== X-Received: by 2002:a5d:5192:: with SMTP id k18mr13343401wrv.171.1554666768919; Sun, 07 Apr 2019 12:52:48 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:47 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 10/11] gc docs: clarify that "gc" doesn't throw away referenced objects Date: Sun, 7 Apr 2019 21:52:16 +0200 Message-Id: <20190407195217.3607-11-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 5e80f306e7..9cdae588fb 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 Sun Apr 7 19:52:17 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: 10888631 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 2B5D5188E for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1155B285A6 for ; Sun, 7 Apr 2019 19:52:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04FB928653; Sun, 7 Apr 2019 19:52:59 +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 A5702285A6 for ; Sun, 7 Apr 2019 19:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726528AbfDGTwx (ORCPT ); Sun, 7 Apr 2019 15:52:53 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51734 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726504AbfDGTww (ORCPT ); Sun, 7 Apr 2019 15:52:52 -0400 Received: by mail-wm1-f66.google.com with SMTP id 4so11911218wmf.1 for ; Sun, 07 Apr 2019 12:52:51 -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=j/+40r/vimG0IZF0D/JeEn+Au5jX5hAn9P5APcpH1/k=; b=a58qBavlRVTZPStvwlhk6L8abwI0xTsplpiSrnddAPuUsrMuDdK7wP/FeSaOQLTJVr nflK9YzSIEqatmj31otXN44jms1FDVGWP6zlUyY9cMq9hCoJwx1IcF6OTbrM17/dKAVP ZmZGTTpLZvrhmXx/w9jEX2+0QECto73DKOoVurdomJzScDp9j8hSYFZ40pHl3kjUyVLp sxyY4zsaDZ7ZvkZm6geHxxdFuWbwi15xF9kuTuazJchNNVMriogbS/DItITl6wRvC/M1 di52GPAr62w53fs/8TuuKFH5e+xiXTa68x385VmKaupJVnIfnpQuTZru/IyHKvaYFj7q x0iA== 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=j/+40r/vimG0IZF0D/JeEn+Au5jX5hAn9P5APcpH1/k=; b=YCX9HaZxZF9jXlncV0Fr2nBqsoPFIBb8MWAwYeRzREyr10Werw4dXZfM3N6Llf7VGg SvHL9LmjXqSqJwwP1bCfwILt8AHcYbnWsjrjDjojznPYZXm5l0zGJXh9l6vn7VePjty2 etV2G+VK01JXwU1Yp03L07JVY9n8KcOnR+GA0BHZ47EEYQRew+iIxMEV+xPnMKwQyGwk zhDN3/6Uh2o1EadV+nNWG/oJ7yqAa67yeZWrayL/bFAj132n5jcR387QcX/pzAQktIxT Z3o2GSdDjTj9HleRnE+4AmSkiWV74pG81WKZVS1p38fMaubm1X697In/ktGIxO/8DcDQ ANTA== X-Gm-Message-State: APjAAAVi8qN78/xQT52sdarGCrnYYP8jzKj9dffjUqnmTamMw0FrV7Z6 hm72VqUjDeH6v/hC22N72EEVIO/LR5k= X-Google-Smtp-Source: APXvYqxWMyroSQvy043BS34LtbmWCUz16v+j6DkneIA6/AglP72AhtkQ6DAclKktHgUqgiofEBZ8Kg== X-Received: by 2002:a7b:cbd6:: with SMTP id n22mr16232951wmi.57.1554666770160; Sun, 07 Apr 2019 12:52:50 -0700 (PDT) Received: from vm.nix.is ([2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id e16sm41815402wrs.0.2019.04.07.12.52.48 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 07 Apr 2019 12:52:49 -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 , Todd Zullinger , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFz?= =?utf-8?b?b24=?= Subject: [PATCH v4 11/11] gc docs: remove incorrect reference to gc.auto=0 Date: Sun, 7 Apr 2019 21:52:17 +0200 Message-Id: <20190407195217.3607-12-avarab@gmail.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e In-Reply-To: <20190322093242.5508-5-avarab@gmail.com> References: <20190322093242.5508-5-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 9cdae588fb..247f765604 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 -----