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

Re: Program path added to sparse file specification if leading slash is used

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 9, 2022, 07:57 UTC
Message-ID
<s53q2s3o-8nsr-0766-rr8p-6n7ro0o07p69@tzk.qr>
In-Reply-To
<db69818f32a2723cb7ef9ddf79d3ae39@schrell.de>
Hi Andreas,
On Mon, 28 Nov 2022, Andreas Schrell wrote:
> What did you do before the bug happened? (Steps to reproduce your issue)
>
> $ git sparse-checkout set /Workspace/Build/Pipeline
> $ git sparse-checkout list C:/Program Files/Git/Workspace/Build/Pipeline

From Git for Windows' release notes, in the "Known Issues" section, https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues:

	If you specify command-line options starting with a slash,
	POSIX-to-Windows path conversion will kick in converting e.g.
	"/usr/bin/bash.exe" to "C:\Program Files\Git\usr\bin\bash.exe". When that
	is not desired -- e.g. "--upload-pack=/opt/git/bin/git-upload-pack" or
	"-L/regex/" -- you need to set the environment variable MSYS_NO_PATHCONV
	temporarily, like so:
	    MSYS_NO_PATHCONV=1 git blame -L/pathconv/ msys2_path_conv.cc
	    Alternatively, you can double the first slash to avoid
	    POSIX-to-Windows path conversion, e.g. "//usr/bin/bash.exe".

Ciao, Johannes

Previous: Andreas Schrell
Message 2 of 2 in “Program path added to sparse file specification if leading slash is used”
  1. Andreas SchrellNov 28, 2022
  2. Johannes SchindelinDec 9, 2022

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.