Skip to content

Remove unused git.cmd script on Mac and Linux #1138

@chrisd8088

Description

@chrisd8088

The GVFS.CommandLine.CloneVerb.CreateGitScript() method is called as one of the steps executed by the gvfs clone command, and it creates a small Windows batch script named git.cmd which is designed to alert users who run git under the enlistment root that their working directory is actually one directory down under src/.

However, this script will not work as expected on Unix platforms, for several reasons -- even if we replace it with an executable generic Unix shell script named git, most users, for security reasons, will not have the current directory (.) in their PATH environment variable, and so would not execute this script unless they explicitly ran ./git. This is in contrast to Windows, where I believe the current directory is searched first by default before the PATH variable is consulted.

It may therefore be simplest to just remove the call to CreateGitScript() on non-Windows platforms.

One alternative might be a basic README or README.txt file that explains where to find the Git working directory (i.e., cd src).

On Linux, we could further add a note that the contents of the working directory under src/ will be empty unless gvfs mount has been run (or after gvfs unmount has been run), because the contents of the working directory will only be projected into place while the custom projfs filesystem is mounted, and that will only be the case between gfvs mount and gvfs unmount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions