Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Various fixes around
safe.directory
#3791Various fixes around
safe.directory
#3791Changes from all commits
1bdb9e3
5d60f3c
93310f0
e64daf2
109ae35
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If this turns out to be the necessary solution we need to prepend
%(preffix)/
to the unquoted as well as the quoted value. GitHub Desktop will use the unquoted value since we won't be passing it via a shell firstThere 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 do need to add the
%(prefix)/
. Without it, Git collapses//
to/
as in this debugger output:Then, we do add this to the quoted output because
prequoted
is the buffer being quoted insq_quote_buf_pretty()
(after appendingdir.buf
toprequoted
).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.
Should we be more stringent and require two slashes before doing this?
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.
I was using this hunk as a precedent for a single slash:
git/path.c
Lines 742 to 747 in 3f8d163
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.
Right, I'm sorry, I'm not being terribly clear, it's late. What I meant was that with this change (if I'm reading it correctly) the output from the warning for a WSL path will be something like
I.e the first path within the first line parenthesis will not have
%(prefix)
prepended right? What I'm saying is that it should because GitHub Desktop will parse that first path and use it to add the config.I'm suggesting we swap out
dir.buf
on line 1392 forprequoted.buf
so that both instances of the path has the%(prefix)
prepended to them,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.
Ah, I get what you're saying now, @niik.
I'm not sure that adding
%(prefix)/
there is a good idea, because that's not the internal representation of the path. The%(prefix)/
concept is only for parsing paths from config.