microsoft / microsoft/VFSForGit
Remove unused git.cmd script on Mac and Linux
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in GVFS/GVFS/CommandLine/CloneVerb.cs at CreateGitScript(), then trace how the gvfs clone command invokes it on each platform. Confirm the existing Windows behavior and identify the non-Windows path to change. Done means Unix platforms no longer create git.cmd, while Windows behavior remains unchanged; check the clone-related tests or commands available in the repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, operating-systems
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100