From: Eric D <eric.decosta@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric DeCosta via GitGitGadget <gitgitgadget@gmail.com>,
Jeff Hostetler <jeffhost@microsoft.com>,
git@vger.kernel.org, Eric DeCosta <edecosta@mathworks.com>
Subject: Re: [PATCH] fsmonitor: option to allow fsmonitor to run against network-mounted repos
Date: Wed, 10 Aug 2022 16:36:57 -0400 [thread overview]
Message-ID: <CAMxJVdH-UbCZYp1hcvy4efEYd33jk0bFosJOtag5S4F9-m3-sg@mail.gmail.com> (raw)
In-Reply-To: <xmqqbksrlvyb.fsf@gitster.g>
On Wed, Aug 10, 2022 at 3:50 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Eric D <eric.decosta@gmail.com> writes:
>
> > Makes sense. How about FSMONITOR_OVERRIDE_REQUIRED ? The error message
> > could then indicate that remote repos are normally unsupported but
> > that setting the fsmonitor.allowRemote flag overrides this behavior.
>
> I actually think check_allow_remote() should be renamed to have
> "config" somewhere in its name, and return -1, 0 or 1 and not "enum
> fsmonitor_reason".
>
> static int check_config_allowremote(...)
> {
> int allow;
>
> if (repor_config_get_bool(..., &allow))
> return allow;
> return -1; /* undecided */
> }
>
> then caller can do
>
> switch (check_config_allowremote(...)) {
> case 0: /* config overrides and disables */
> return FSMONITOR_REASON_REMOTE;
> case 1: /* config overrides and enables */
> return FSMONITOR_REASON_OK;
> default:
> break; /* config has no opinion */
> }
> return check_smb(...);
>
> > If we do as you suggest above, then fsmonitor.allowRemote=true would
> > override regardless of the protocol being used.
>
> Exactly. The code should not try to outsmart the user.
>
> If the user says they wants to use it on a particular remote, even
> if you do not know if that particular remote system works, just let
> them try and see if it works. If it does not, they can easily
> disable, because the enabiling was a deliberate act by them in the
> first place. They know how to fix it.
>
> Thanks.
>
100% agree with you, thanks.
next prev parent reply other threads:[~2022-08-10 20:37 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 17:44 [PATCH] fsmonitor: option to allow fsmonitor to run against network-mounted repos Eric DeCosta via GitGitGadget
2022-08-10 16:49 ` Junio C Hamano
2022-08-10 18:49 ` Eric D
2022-08-10 19:50 ` Junio C Hamano
2022-08-10 20:36 ` Eric D [this message]
2022-08-10 21:30 ` Eric D
2022-08-10 21:41 ` Junio C Hamano
2022-08-11 15:57 ` [PATCH v2 0/2] Option to allow fsmonitor to run against repos on network file systems Eric DeCosta via GitGitGadget
2022-08-11 15:57 ` [PATCH v2 1/2] fsmonitor: option to allow fsmonitor to run against network-mounted repos Eric DeCosta via GitGitGadget
2022-08-11 15:57 ` [PATCH v2 2/2] fsmonitor.allowRemote now overrides default behavior Eric DeCosta via GitGitGadget
2022-08-11 16:53 ` Junio C Hamano
2022-08-11 17:49 ` Eric D
2022-08-11 17:53 ` Junio C Hamano
2022-08-11 17:58 ` Eric D
2022-08-11 18:32 ` [PATCH v3] fsmonitor: option to allow fsmonitor to run against network-mounted repos Eric DeCosta via GitGitGadget
2022-08-11 19:33 ` Junio C Hamano
2022-08-11 23:57 ` [PATCH v4] " Eric DeCosta via GitGitGadget
2022-08-12 18:23 ` Junio C Hamano
2022-08-15 16:01 ` Jeff Hostetler
2022-08-15 17:33 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2022-08-18 20:48 [PATCH] " Eric DeCosta via GitGitGadget
2022-08-18 21:35 ` Junio C Hamano
2022-08-18 21:38 ` Junio C Hamano
2022-08-19 10:05 ` Johannes Schindelin
2022-08-19 16:50 ` Jeff Hostetler
2022-08-19 18:38 ` Eric DeCosta
2022-08-19 20:15 ` Jeff Hostetler
2022-08-19 17:48 ` Eric Sunshine
2022-08-19 18:58 ` Torsten Bögershausen
2022-08-20 22:24 ` Junio C Hamano
2022-08-22 13:22 ` Johannes Schindelin
2022-08-22 16:07 ` Junio C Hamano
2022-08-23 13:51 ` Jeff Hostetler
2022-08-24 15:45 ` Eric DeCosta
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMxJVdH-UbCZYp1hcvy4efEYd33jk0bFosJOtag5S4F9-m3-sg@mail.gmail.com \
--to=eric.decosta@gmail.com \
--cc=edecosta@mathworks.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).