-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(ShellEx): Support adding multiple files #11770
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
Conversation
on registration of the shell extension Refs: gitextensions#11770
f785ca8
to
3ff09aa
Compare
bc2754b
to
e2c0cd7
Compare
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 have not run or reviewed thoroughly, test succeeded.
public static void Register() => RunRegSvrForShellExtensionDlls("/s {0}"); | ||
public static void Register() | ||
{ | ||
AppSettings.SetInstallDir(AppSettings.GetGitExtensionsDirectory()); |
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.
Wouldn't we need the same for other invocation of RunRegSvrForShellExtensionDlls
?
Wouldn't it make sense to call AppSettings.SetInstallDir
in RunRegSvrForShellExtensionDlls
?
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.
Wouldn't it make sense to call AppSettings.SetInstallDir in RunRegSvrForShellExtensionDlls?
Not for deregistration.
Wouldn't we need the same for other invocation of RunRegSvrForShellExtensionDlls?
Deregistration is the only other caller.
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.
Makes sense
@@ -15,13 +15,13 @@ public FormAddFiles(IGitUICommands commands, string? addFile = null) | |||
|
|||
private void ShowFilesClick(object sender, EventArgs e) | |||
{ | |||
string arguments = string.Format("add --dry-run{0} \"{1}\"", force.Checked ? " -f" : "", Filter.Text); | |||
string arguments = string.Format("add --dry-run{0} {1}", force.Checked ? " -f" : "", Filter.Text); |
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.
What's the value of Filter.Text
? Doesn't it need to be quoted? That is Filter.Text.Quote()
?
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.
What's the value of Filter.Text? Doesn't it need to be quoted? That is Filter.Text.Quote()?
Command line arguments have already been quoted (refer to the screenshot in the PR description). Other callsites do not fill the textbox.
So if the user removes quotes from file names with spaces, it is their fault.
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.
Makes sense
Noting that the fix has been confirmed by @asmwarrior in #11711 (comment) |
on registration of the shell extension Refs: gitextensions#11770
80612eb
to
eb481dd
Compare
Fixes #11711
Proposed changes
InstallDir
to registry on registration of the shell extensionScreenshots
Before
N/A
After
Test methodology
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.