git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] fsmonitor: option to allow fsmonitor to run against network-mounted repos

From
EDEric D <eric.decosta@gmail.com>
Date
Aug 10, 2022, 20:36 UTC
Message-ID
<CAMxJVdH-UbCZYp1hcvy4efEYd33jk0bFosJOtag5S4F9-m3-sg@mail.gmail.com>
In-Reply-To
<xmqqbksrlvyb.fsf@gitster.g>
On Wed, Aug 10, 2022 at 3:50 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 45 quoted lines
>
> 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.
Previous: Junio C HamanoNext: Eric D
Message 5 of 20 in “fsmonitor: option to allow fsmonitor to run against network-mounted repos”
  1. fsmonitor: option to allow fsmonitor to run against network-mounted reposEric DeCosta via GitGitGadget, Aug 9, 2022
  2. Junio C HamanoAug 10, 2022
  3. Eric DAug 10, 2022
  4. Junio C HamanoAug 10, 2022
  5. Eric DAug 10, 2022
  6. Eric DAug 10, 2022
  7. Junio C HamanoAug 10, 2022
  8. 0/2 Option to allow fsmonitor to run against repos on network file systemsEric DeCosta via GitGitGadget, Aug 11, 2022
  9. 1/2 fsmonitor: option to allow fsmonitor to run against network-mounted reposEric DeCosta via GitGitGadget, Aug 11, 2022
  10. 2/2 fsmonitor.allowRemote now overrides default behaviorEric DeCosta via GitGitGadget, Aug 11, 2022
  11. Junio C HamanoAug 11, 2022
  12. Eric DAug 11, 2022
  13. Junio C HamanoAug 11, 2022
  14. Eric DAug 11, 2022
  15. fsmonitor: option to allow fsmonitor to run against network-mounted reposEric DeCosta via GitGitGadget, Aug 11, 2022
  16. Junio C HamanoAug 11, 2022
  17. fsmonitor: option to allow fsmonitor to run against network-mounted reposEric DeCosta via GitGitGadget, Aug 11, 2022
  18. Junio C HamanoAug 12, 2022
  19. Jeff HostetlerAug 15, 2022
  20. Junio C HamanoAug 15, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.