You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File names starting with a dash - (a.k.a. hyphen-minus) are interpreted as program options unless a double-dash -- is used to separate them from file names. Currently, it seems file names are simply appended without this separator.
Whenever an explicit file list is passed to git, this leads to a failure of that invocation. (E.g. when manually staging a file by clicking the + next to it in the source view.) Instead, the git usage message is returned as a red notification bubble.
While I don't see any obvious exploits resulting from this, I haven't bothered to dig deeper. It's probably a good idea to fix this soon.
Relevant errors (if available)
error: unknown switch `((some part of the filename))'usage: git add [<options>] [--] <pathspec>... -n, --dry-run dry run[...]
Steps to reproduce
Create a file with a hyphen at the start of its name, e.g. -INBOX- (names like that are useful because they sort to the very top)
Open the plugin's Source Control View
Click the + next to the file under "Changes" to stage the changes.
Expected Behavior
The file should be staged normally.
Addition context
This should be quite easy to fix by adding -- into all template strings in front of the place where file names are appended / interpolated.
Operating system
Windows
The text was updated successfully, but these errors were encountered:
Describe the bug
File names starting with a dash
-
(a.k.a. hyphen-minus) are interpreted as program options unless a double-dash--
is used to separate them from file names. Currently, it seems file names are simply appended without this separator.Whenever an explicit file list is passed to
git
, this leads to a failure of that invocation. (E.g. when manually staging a file by clicking the+
next to it in the source view.) Instead, thegit
usage message is returned as a red notification bubble.While I don't see any obvious exploits resulting from this, I haven't bothered to dig deeper. It's probably a good idea to fix this soon.
Relevant errors (if available)
Steps to reproduce
-INBOX-
(names like that are useful because they sort to the very top)+
next to the file under "Changes" to stage the changes.Expected Behavior
The file should be staged normally.
Addition context
This should be quite easy to fix by adding
--
into all template strings in front of the place where file names are appended / interpolated.Operating system
Windows
The text was updated successfully, but these errors were encountered: