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

Re: [PATCH v1] fsmonitor: simplify determining the git worktree under Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2017, 01:02 UTC
Message-ID
<xmqqzi7rat4a.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171110210311.11036-1-benpeart@microsoft.com>
Ben Peart <benpeart@microsoft.com> writes:
> I haven't tested the non Windows paths but the patch looks reasonable.

I do not think the above line part of the proposed log message for this patch ;-) I guess I'll strip these earlier parts and leave only the last paragraph while queuing.

Show 14 quoted lines
>
> This inspired me to get someone more familiar with perl (thanks Johannes)
> to revisit this code for the Windows side as well.  The logic for
> determining the git worktree when running on Windows is more complex
> than necessary.  It also spawns multiple processes (uname and cygpath)
> which slows things down.
>
> Simplify and speed up the process of finding the git worktree when
> running on Windows by keeping it in perl and avoiding spawning helper
> processes.
>
> Signed-off-by: Ben Peart <benpeart@microsoft.com>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
The patch looks reasonable ;-)  Thanks.
Show 6 quoted lines
> +if ($^O =~ 'msys' || $^O =~ 'cygwin') {
> +	$git_work_tree = Win32::GetCwd();
> +	$git_work_tree =~ tr/\\/\//;
>  } else {
>  	require Cwd;
>  	$git_work_tree = Cwd::cwd();
Previous: Ben Peart
Message 9 of 9 in “fsmonitor: Stop reading from PWD, write fsmonitor+split index right”
  1. 0/2 fsmonitor: Stop reading from PWD, write fsmonitor+split index rightAlex Vandiver, Nov 9, 2017
  2. 2/2 fsmonitor: Store fsmonitor bitmap before splitting indexAlex Vandiver, Nov 9, 2017
  3. Junio C HamanoNov 10, 2017
  4. Ben PeartNov 13, 2017
  5. Alex VandiverDec 16, 2017
  6. 1/2 fsmonitor: Read from getcwd(), not the PWD environment variableAlex Vandiver, Nov 9, 2017
  7. Junio C HamanoNov 10, 2017
  8. fsmonitor: simplify determining the git worktree under WindowsBen Peart, Nov 10, 2017
  9. Junio C HamanoNov 13, 2017

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.