git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Ben Peart" <peartben@gmail.com>
Cc: Jeff King <peff@peff.net>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Ben Peart <benpeart@microsoft.com>,
	Jeff Hostetler <git@jeffhostetler.com>
Subject: Recommended configurations (was Re: [PATCH v1 2/2] reset: add new reset.quietDefault config setting)
Date: Wed, 24 Oct 2018 11:48:20 -0400	[thread overview]
Message-ID: <29db5fed-4556-277e-7aad-7ff3233550a9@gmail.com> (raw)
In-Reply-To: <87zhv4bfck.fsf@evledraar.gmail.com>

On 10/23/2018 4:03 PM, Ævar Arnfjörð Bjarmason wrote:
> [snip]
> The --ahead-behind config setting stalled on-list before:
> https://public-inbox.org/git/36e3a9c3-f7e2-4100-1bfc-647b809a09d0@jeffhostetler.com/
>
> Now we have this similarly themed thing.
>
> I think we need to be mindful of how changes like this can add up to
> very confusing UI. I.e. in this case I can see a "how take make git fast
> on large repos" post on stackoverflow in our future where the answer is
> setting a bunch of seemingly irrelevant config options like reset.quiet
> and status.aheadbehind=false etc.
>
> So maybe we should take a step back and consider if the real thing we
> want is just some way for the user to tell git "don't work so hard at
> coming up with these values".
>
> That can also be smart, e.g. some "auto" setting that tweaks it based on
> estimated repo size so even with the same config your tiny dotfiles.git
> will get "ahead/behind" reporting, but not when you cd into windows.git.

Generally, there are a lot of config settings that are likely in the "if 
you have a big repo, then you should use this" category. However, there 
is rarely a one-size-fits-all solution to these problems, just like 
there are different ways a repo can be "big" (working directory? number 
of commits? submodules?).

I would typically expect that users with _really_ big repos have the 
resources to have an expert tweak the settings that are best for that 
data shape and share those settings with all the users. In VFS for Git, 
we turn certain config settings on by default when mounting the repo 
[1], but others are either signaled through warning messages (like the 
status.aheadBehind config setting [2]).

We never upstreamed the status.aheadBehind config setting [2], but we 
_did_ upstream the command-line option as fd9b544 "status: add 
--[no-]ahead-behind to status and commit for V2 format". We didn't want 
to change the expected output permanently, so we didn't add the config 
setting to our list of "required" settings, but instead created a list 
of optional settings [3]; these settings don't override the existing 
settings so users can opt-out. (Now that we have the commit-graph 
enabled and kept up-to-date, it may be time to revisit the importance of 
this setting.)

All of this is to say: it is probably a good idea to have some 
"recommended configuration" for big repos, but there will always be 
power users who want to tweak each and every one of these settings. I'm 
open to design ideas of how to store a list of recommended 
configurations and how to set a group of config settings with one 
command (say, a "git recommended-config [small|large|submodules]" 
builtin that fills the local config with the important settings).

Thanks,
-Stolee

[1] 
https://github.com/Microsoft/VFSForGit/blob/7daa9f1133764a4e4bd87014833fc2091e6702c1/GVFS/GVFS/CommandLine/GVFSVerb.cs#L79-L104
     Code in VFS for Git that enables "required" config settings.

[2] 
https://github.com/Microsoft/git/commit/0cbe9e6b23e4d9008d4a1676e1dd6a87bdcd6ed5
     status: add status.aheadbehind setting

[3] 
https://github.com/Microsoft/VFSForGit/blob/7daa9f1133764a4e4bd87014833fc2091e6702c1/GVFS/GVFS/CommandLine/GVFSVerb.cs#L120-L123
     Code in VFS for Git that enables "optional" config settings.

  reply	other threads:[~2018-10-24 15:48 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 16:40 [PATCH v1 0/2] speed up git reset Ben Peart
2018-10-17 16:40 ` [PATCH v1 1/2] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-17 18:14   ` Eric Sunshine
2018-10-17 18:22     ` Jeff King
2018-10-18  3:40       ` Junio C Hamano
2018-10-18  6:36         ` Jeff King
2018-10-18 18:15           ` Ben Peart
2018-10-18 18:26             ` Duy Nguyen
2018-10-18 19:03               ` Ben Peart
2018-10-19  0:34             ` Junio C Hamano
2018-10-17 16:40 ` [PATCH v1 2/2] reset: add new reset.quietDefault config setting Ben Peart
2018-10-17 18:19   ` Eric Sunshine
2018-10-17 18:23     ` Jeff King
2018-10-23  9:13       ` Ævar Arnfjörð Bjarmason
2018-10-23 18:11         ` Ben Peart
2018-10-23 20:02           ` Jeff King
2018-10-23 20:03           ` Ævar Arnfjörð Bjarmason
2018-10-24 15:48             ` Derrick Stolee [this message]
2018-10-24 23:58               ` Recommended configurations (was Re: [PATCH v1 2/2] reset: add new reset.quietDefault config setting) Jeff King
2018-10-25  4:09                 ` Junio C Hamano
2018-10-19 16:12 ` [PATCH v2 0/3] speed up git reset Ben Peart
2018-10-19 16:12   ` [PATCH v2 1/3] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-19 16:12   ` [PATCH v2 2/3] reset: add new reset.quiet config setting Ben Peart
2018-10-19 16:36     ` Eric Sunshine
2018-10-19 16:46       ` Jeff King
2018-10-19 17:10         ` Eric Sunshine
2018-10-19 17:11           ` Jeff King
2018-10-19 17:23             ` Ben Peart
2018-10-19 19:08               ` Jeff King
2018-10-22  5:04               ` Junio C Hamano
2018-10-19 17:11         ` Ben Peart
2018-10-19 16:12   ` [PATCH v2 3/3] reset: warn when refresh_index() takes more than 2 seconds Ben Peart
2018-10-22 13:18 ` [PATCH v3 0/3] speed up git reset Ben Peart
2018-10-22 13:18   ` [PATCH v3 1/3] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-22 20:44     ` Johannes Schindelin
2018-10-22 22:07       ` Ben Peart
2018-10-23  8:53         ` Johannes Schindelin
2018-10-23 15:46         ` Duy Nguyen
2018-10-23 19:55           ` Johannes Schindelin
2018-10-22 13:18   ` [PATCH v3 2/3] reset: add new reset.quiet config setting Ben Peart
2018-10-22 14:45     ` Duy Nguyen
2018-10-23 18:47       ` Ben Peart
2018-10-24  2:56         ` Junio C Hamano
2018-10-24  7:21           ` Junio C Hamano
2018-10-24 14:54           ` Duy Nguyen
2018-10-25  1:12             ` Junio C Hamano
2018-10-24 14:49         ` Duy Nguyen
2018-10-22 19:13     ` Ramsay Jones
2018-10-22 20:06       ` Jeff King
2018-10-23 17:31         ` Ben Peart
2018-10-23 17:35           ` Jeff King
2018-10-22 13:18   ` [PATCH v3 3/3] reset: warn when refresh_index() takes more than 2 seconds Ben Peart
2018-10-23  0:23     ` Junio C Hamano
2018-10-23 17:12       ` Ben Peart
2018-10-23 19:04 ` [PATCH v4 0/3] speed up git reset Ben Peart
2018-10-23 19:04   ` [PATCH v4 1/3] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-23 19:04   ` [PATCH v4 2/3] reset: add new reset.quiet config setting Ben Peart
2018-10-24  0:39     ` Ramsay Jones
2018-10-25  4:56       ` Junio C Hamano
2018-10-25  9:26         ` Junio C Hamano
2018-10-25 13:26           ` Ben Peart
2018-10-25 17:04           ` Ramsay Jones
2018-10-23 19:04   ` [PATCH v4 3/3] reset: warn when refresh_index() takes more than 2 seconds Ben Peart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29db5fed-4556-277e-7aad-7ff3233550a9@gmail.com \
    --to=stolee@gmail.com \
    --cc=avarab@gmail.com \
    --cc=benpeart@microsoft.com \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peartben@gmail.com \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).