git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ben Peart <benpeart@microsoft.com>
Cc: Johannes.Schindelin@gmx.de, alexmv@dropbox.com,
	git@vger.kernel.org, peartben@gmail.com
Subject: Re: [PATCH v1] fsmonitor: simplify determining the git worktree under Windows
Date: Mon, 13 Nov 2017 10:02:13 +0900	[thread overview]
Message-ID: <xmqqzi7rat4a.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20171110210311.11036-1-benpeart@microsoft.com> (Ben Peart's message of "Fri, 10 Nov 2017 16:03:11 -0500")

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.

>
> 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.

> +if ($^O =~ 'msys' || $^O =~ 'cygwin') {
> +	$git_work_tree = Win32::GetCwd();
> +	$git_work_tree =~ tr/\\/\//;
>  } else {
>  	require Cwd;
>  	$git_work_tree = Cwd::cwd();

      reply	other threads:[~2017-11-13  1:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 19:58 [PATCH 0/2] fsmonitor: Stop reading from PWD, write fsmonitor+split index right Alex Vandiver
2017-11-09 19:58 ` [PATCH 1/2] fsmonitor: Read from getcwd(), not the PWD environment variable Alex Vandiver
2017-11-09 19:58   ` [PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index Alex Vandiver
2017-11-10  5:11     ` Junio C Hamano
2017-11-13 15:28     ` Ben Peart
2017-12-16  2:02       ` Alex Vandiver
2017-11-10  5:04   ` [PATCH 1/2] fsmonitor: Read from getcwd(), not the PWD environment variable Junio C Hamano
2017-11-10 21:03     ` [PATCH v1] fsmonitor: simplify determining the git worktree under Windows Ben Peart
2017-11-13  1:02       ` Junio C Hamano [this message]

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=xmqqzi7rat4a.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=alexmv@dropbox.com \
    --cc=benpeart@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=peartben@gmail.com \
    --subject='Re: [PATCH v1] fsmonitor: simplify determining the git worktree under Windows' \
    /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

Code repositories for project(s) associated with this 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).