All of lore.kernel.org
 help / color / mirror / Atom feed
* New built-in fsmonitor: messages accidentally on stdout?
@ 2021-09-24 18:02 Tao Klerks
  2021-09-27  9:32 ` Tao Klerks
  0 siblings, 1 reply; 4+ messages in thread
From: Tao Klerks @ 2021-09-24 18:02 UTC (permalink / raw)
  To: git

Hi folks,

I've been testing the new "core.usebuiltinfsmonitor=true" capability
in Git for Windows 2.33.0.windows.2, and came across something today
that threw off my scripting:

In general, git "informational" messages are always output on stderr;
this caught me out initially, but is a godsend for scripting.

However, with this new functionality, the "starting fsmonitor-daemon
in 'C:/whatever" message is being output on stdout!

This interferes with scripting around things like "git status --porcelain".

I understand this fsmonitor stuff is still somewhat in-flux (patched
into the windows port but not yet "regular" git releases?), and this
issue may already have been reported and addressed in the latest set
of patches - my apologies if that is the case!

Best regards,
Tao

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New built-in fsmonitor: messages accidentally on stdout?
  2021-09-24 18:02 New built-in fsmonitor: messages accidentally on stdout? Tao Klerks
@ 2021-09-27  9:32 ` Tao Klerks
  2021-09-27 13:52   ` Jeff Hostetler
  2021-10-05  8:43   ` Johannes Schindelin
  0 siblings, 2 replies; 4+ messages in thread
From: Tao Klerks @ 2021-09-27  9:32 UTC (permalink / raw)
  To: git

Hi folks,

I did track down where that message was being issued onto stdout in
git-for-windows
(https://github.com/git-for-windows/git/blob/main/builtin/fsmonitor--daemon.c),
and I see that in the the latest version of the patch series it was
already switched to stderr
(https://github.com/jeffhostetler/git/blob/f08a63e197a0efe4d8f0452893238b0d3156e669/builtin/fsmonitor--daemon.c).

The only remaining thing I can ask for, I guess, is that the next Git
for Windows release ideally include this change/fix, even though the
built-in fsmonitor is not in "regular git" at all yet?

Thanks,
Tao


On Fri, Sep 24, 2021 at 8:02 PM Tao Klerks <tao@klerks.biz> wrote:
>
> Hi folks,
>
> I've been testing the new "core.usebuiltinfsmonitor=true" capability
> in Git for Windows 2.33.0.windows.2, and came across something today
> that threw off my scripting:
>
> In general, git "informational" messages are always output on stderr;
> this caught me out initially, but is a godsend for scripting.
>
> However, with this new functionality, the "starting fsmonitor-daemon
> in 'C:/whatever" message is being output on stdout!
>
> This interferes with scripting around things like "git status --porcelain".
>
> I understand this fsmonitor stuff is still somewhat in-flux (patched
> into the windows port but not yet "regular" git releases?), and this
> issue may already have been reported and addressed in the latest set
> of patches - my apologies if that is the case!
>
> Best regards,
> Tao

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New built-in fsmonitor: messages accidentally on stdout?
  2021-09-27  9:32 ` Tao Klerks
@ 2021-09-27 13:52   ` Jeff Hostetler
  2021-10-05  8:43   ` Johannes Schindelin
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Hostetler @ 2021-09-27 13:52 UTC (permalink / raw)
  To: Tao Klerks, git



On 9/27/21 5:32 AM, Tao Klerks wrote:
> Hi folks,
> 
> I did track down where that message was being issued onto stdout in
> git-for-windows
> (https://github.com/git-for-windows/git/blob/main/builtin/fsmonitor--daemon.c),
> and I see that in the the latest version of the patch series it was
> already switched to stderr
> (https://github.com/jeffhostetler/git/blob/f08a63e197a0efe4d8f0452893238b0d3156e669/builtin/fsmonitor--daemon.c).
> 
> The only remaining thing I can ask for, I guess, is that the next Git
> for Windows release ideally include this change/fix, even though the
> built-in fsmonitor is not in "regular git" at all yet?

Yes, I've fixed that in my branch to print to stderr (and also
put it behind a feature flag).

If my current series does not make it into core Git in time
for the next release, we will update the experimental version
in the next git-for-windows release.

Thanks,
Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New built-in fsmonitor: messages accidentally on stdout?
  2021-09-27  9:32 ` Tao Klerks
  2021-09-27 13:52   ` Jeff Hostetler
@ 2021-10-05  8:43   ` Johannes Schindelin
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2021-10-05  8:43 UTC (permalink / raw)
  To: Tao Klerks; +Cc: git

Hi Tao,

On Mon, 27 Sep 2021, Tao Klerks wrote:

> I did track down where that message was being issued onto stdout in
> git-for-windows
> (https://github.com/git-for-windows/git/blob/main/builtin/fsmonitor--daemon.c),
> and I see that in the the latest version of the patch series it was
> already switched to stderr
> (https://github.com/jeffhostetler/git/blob/f08a63e197a0efe4d8f0452893238b0d3156e669/builtin/fsmonitor--daemon.c).
>
> The only remaining thing I can ask for, I guess, is that the next Git
> for Windows release ideally include this change/fix, even though the
> built-in fsmonitor is not in "regular git" at all yet?

The latest snapshot at
https://wingit.blob.core.windows.net/files/index.html should include the
latest iteration of the FSMonitor feature.

Ciao,
Johannes

> On Fri, Sep 24, 2021 at 8:02 PM Tao Klerks <tao@klerks.biz> wrote:
> >
> > Hi folks,
> >
> > I've been testing the new "core.usebuiltinfsmonitor=true" capability
> > in Git for Windows 2.33.0.windows.2, and came across something today
> > that threw off my scripting:
> >
> > In general, git "informational" messages are always output on stderr;
> > this caught me out initially, but is a godsend for scripting.
> >
> > However, with this new functionality, the "starting fsmonitor-daemon
> > in 'C:/whatever" message is being output on stdout!
> >
> > This interferes with scripting around things like "git status --porcelain".
> >
> > I understand this fsmonitor stuff is still somewhat in-flux (patched
> > into the windows port but not yet "regular" git releases?), and this
> > issue may already have been reported and addressed in the latest set
> > of patches - my apologies if that is the case!
> >
> > Best regards,
> > Tao
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-05  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 18:02 New built-in fsmonitor: messages accidentally on stdout? Tao Klerks
2021-09-27  9:32 ` Tao Klerks
2021-09-27 13:52   ` Jeff Hostetler
2021-10-05  8:43   ` Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.