File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -201,10 +201,9 @@ PBHistorySearchMode searchModeForCommandLineArgument(NSString *argument)
201201 return nil ;
202202}
203203
204- void handleGitXSearch (NSURL *repositoryURL, NSMutableArray *arguments)
204+ void handleGitXSearch (NSURL *repositoryURL, PBHistorySearchMode mode, NSMutableArray *arguments)
205205{
206206 NSString *searchString = [arguments componentsJoinedByString: @" " ];
207- NSInteger mode = searchModeForCommandLineArgument (searchString);
208207
209208 // remove the prefix from search string before sending it
210209 NSArray *prefixes = commandLineSearchPrefixes ();
@@ -363,9 +362,15 @@ int main(int argc, const char** argv)
363362 [arguments removeObjectAtIndex: 0 ];
364363 handleClone (wdURL, arguments);
365364 }
366-
367- if (searchModeForCommandLineArgument (firstArgument)) {
368- handleGitXSearch (wdURL, arguments);
365+
366+ PBHistorySearchMode mode;
367+ if ((mode = searchModeForCommandLineArgument (firstArgument))) {
368+ handleGitXSearch (wdURL, mode, arguments);
369+ }
370+
371+ if ([firstArgument isEqualToString: @" --" ]) {
372+ [arguments removeObjectAtIndex: 0 ];
373+ handleGitXSearch (wdURL, PBHistorySearchModePath, arguments);
369374 }
370375 }
371376
You can’t perform that action at this time.
0 commit comments