From 05aa5823a0a06a2b3895156f8cc2d1d530e9d9aa Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Mon, 19 Feb 2018 16:36:43 -0800 Subject: [PATCH] update-all-config: squelch logallrefupdates warning for worktrees If the worktrees subdirectory exists, linked working trees are most likely in use. In that case, core.logAllRefUpdates will likely be set to true. The original reason for the warning was due to the fact that Girocco's gc.sh script would not retain objects referenced only by a ref log entry. With the advent of 0df1370df327fbc3 (gc.sh: the new order, 2017-12-16), ref logs are no longer ignored by gc.sh. Nevertheless, having core.logAllRefUpdates=true in a bare repository only serves to create needless overhead thus the warning still applies. Unless there are linked working trees in use. If linked working trees are in use it's quite possible that core.logAllRefUpdates has been changed to true. And when used by linked working trees, the ref logs are no longer pointless overhead as the linked working trees can actually use them. Therefore quietly squelch the warning if core.logAllRefUpdates is found to be true AND the "worktrees" subdirectory exists (which is a sign that linked working trees have been and possibly still are being used). Signed-off-by: Kyle J. McKay --- toolbox/update-all-config.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolbox/update-all-config.pl b/toolbox/update-all-config.pl index cc61752..b9df9cd 100755 --- a/toolbox/update-all-config.pl +++ b/toolbox/update-all-config.pl @@ -386,7 +386,8 @@ sub process_one_project if (valid_bool($laru)) { $setlaru = 0; if (git_bool($laru)) { - pmsg($proj, "WARNING: core.logallrefupdates is true (left unchanged)") unless $quiet; + pmsg($proj, "WARNING: core.logallrefupdates is true (left unchanged)") + unless $quiet || -d "worktrees"; } } else { pmsg($proj, "WARNING: replacing non-boolean core.logallrefupdates value") unless $quiet; -- 2.11.4.GIT