New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FormCreateWorktree: Build potential worktree path using repository path #10290
FormCreateWorktree: Build potential worktree path using repository path #10290
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sensible! Just nitpicks.
instead of the currently checked out worktree that probably contains information related to the branch checked out
c9115a9
to
1029544
Compare
done. |
{ | ||
return string.Join("_", branchName.Split(_invalidCharsInPath, StringSplitOptions.RemoveEmptyEntries)).TrimEnd('.'); | ||
} | ||
string NormalizeBranchName(string branchName) => string.Join("_", branchName.Split(_invalidCharsInPath, StringSplitOptions.RemoveEmptyEntries)).TrimEnd('.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have branch normalisation strategies we use in the branch dialog. Should we use the same?
Not asking to do it here, just making an observation.
instead of the currently checked out worktree
that probably contains information related to the branch checked out
Screenshots
Before
The directory path proposed for the new worktree is based on the current checked out worktree (so the path proposed could be strange if it contains the name of the branch in the path)
After
Whatever is the worktree checked out, the path proposed is based on the main git repo path
Test methodology
Test environment(s)
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.