mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-05 20:40:05 -08:00
Don't interpret a literal "-" as an option argument on command line
This allows the following command to work properly: git-crypt export-key - Previously, you had to run this command, because - was being interpreted as an option argument: git-crypt export-key -- -
This commit is contained in:
@@ -43,7 +43,7 @@ int parse_options (const Options_list& options, int argc, const char** argv)
|
||||
{
|
||||
int argi = 0;
|
||||
|
||||
while (argi < argc && argv[argi][0] == '-') {
|
||||
while (argi < argc && argv[argi][0] == '-' && argv[argi][1] != '\0') {
|
||||
if (std::strcmp(argv[argi], "--") == 0) {
|
||||
++argi;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user