forked from pieter/gitx
-
Notifications
You must be signed in to change notification settings - Fork 204
Work on gitx
#302
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
Closed
Closed
Work on gitx
#302
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebased. |
Renamed to PBRepositoryFinder and cleaned up its methods.
Here are the steps it goes through : 1. If `--git-dir` is provided and points to a repository, return that. If it's not a repo, inform the user and exit. Handles `gitx --git-dir=path` or `gitx --git-dir path`. 2. Loops through the rest of the arguments for something that resolves to a repository. Handles `gitx ..`, `gitx path/to/submodule`. 3. Try to find a repository starting from the current working directory. Handles `gitx`. 4. Inform user that we couldn't find a repository and exit. I'm not yet sure about step 2, because it somewhat conflicts with the current behavior if there's a directory with the same name as a branch. You'd end up resolving `branchname` as a repository (either as itself if it is one, or as your CWD) and cause the GitX window to reopen instead of filtering on the `branch name` branch.
This allows us to stop depending on `git` for the CLI tool.
Note that I'm not really fond of it, I'd prefer having real AppleScript arguments over passing a bunch of strings. But I'm not sure our CLI syntax is "strict" enough.
…ctually work. Also, cleanup the weird `inWorkingDirectory:` arguments. We're the repository, we know where work from, thanks ;-).
This is to prevent `sdp` from inserting `NS_RETURNS_NOT_RETAINED` and triggering a warning. The old name is still there, as an hidden synonym.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is based on #301.
Modifications :
git
. This effectively removes the dependency ongit
;-).Note that I added a dependency on Objective-Git, so that
gitx
can warn execution outside of a working copy without distracting you by making GitX do it.gitx
argument parsing handle file-system paths.This allows one to call
gitx path/to/submodule
, orgitx ..
and have the window open at the correct location (see #8352816 for caveats though).gitx
so it doesn't rely on GitX for--version
.