-
Notifications
You must be signed in to change notification settings - Fork 204
Fix for command line utility #278
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
When the CLI command is invoked without any arguments or with some refs, the CLI command was using a low-level NSAppleEventDescriptor to communicate with the main GUI process. That behavior was inconsistent with the behavior for other command-line options, where communication is done with high-level Scripting Bridge. Moreover, the GUI side was failing to handle the NSAppleEventDescriptor and thus ignoring command line arguments passed from CLI (cf. #196). This commit modifies the code so that CLI and GUI always use Scripting Bridge to send and receive command-line arguments correctly.
Recreating the graph queue means that the new queue may start a background operation before the old queue is still running another operation. Multiple operations being executed at the same time seem to be causing an occasional crash because they are not synchronized. Note that calling cancelAllOperations for the old queue does not abort an operation that has already started.
The rev specifier strings may not always simple symbolic refs. They may be SHA values or refs with some modifiers like HEAD~3^2. They needs to be rev-parsed to load commits as expected.
Refs that are not branches, tags, nor remotes should be added to the "others" list rather than the "branches" list.
If the ref is a SHA string rather than an ordinary named ref, the "referenceByLookingUpReferencedNamed:..." method doesn't find the expected GTReference. The "lookupObjectByRevParse:..." method can be used to parse SHA strings as well as named refs.
Sounds good, will review. |
I'm working on removing the dependency So that conflicts with what d2c426c does here, as well as not being too clean IMHO (this passes arguments as raw strings through AppleScript, while it would be better to have real options for that). @aYukiWatanabe What's the actual use case you're having in mind ? I can't understand what you're expecting |
Before gitx switched to Objective-Git, gitx used to accept any arguments that are accepted by I often compare the history between the master branch and a working branch by By the way, I'm not sure if gitx should fully restore the old argument syntax support. AFAIK, Objective-Git and libgit don't seem to have API to parse arguments in the same way as |
I found the "gitx" command line utility was not correctly handling arguments and tried to fix it.
I believe
$ gitx (one or more branch names or commit SHAs)
should work on the command line now.