Skip to content

fix: shorten GetPipeName() output - #2585

Open
Thundernerd wants to merge 4 commits into
sourcegit-scm:developfrom
Thundernerd:fix/unix-pipename-crash
Open

fix: shorten GetPipeName() output#2585
Thundernerd wants to merge 4 commits into
sourcegit-scm:developfrom
Thundernerd:fix/unix-pipename-crash

Conversation

@Thundernerd

Copy link
Copy Markdown

Redo of #2579 with correct target branch.


This is a hotfix to combat the hard crash on unix machines which was introduced by e0e2ab6

On Unix machines the NamedPipeServerStream is created with a Path.GetTempPath() and "CoreFXPipe_" prefix, causing the recent change to go over the maximum length of the pipename of 104 characters: dotnet Unix PipeStream sourcecode.

Note
In the case of a long username this can still break as we now add an extra 16 characters from the hash to this pipe name.

Closes #2576

@Thundernerd

Copy link
Copy Markdown
Author

Like @JC-Chung suggested, reduced the hash length to 8 characters.
Also renamed from SGit to SourceGit again for clarity, which adds 4 characters.
In total now it has been reduced by 14 characters

@Mingun

Mingun commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

In the case of a long username this can still break as we now add an extra 16 characters from the hash to this pipe name.

That problem can be totally eliminated if include the user name in hash. What the point to keep it readable in this internal name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants