'git pull remote branch' will not update the remote's tracking branches, only the selected local branch. It may not be readily apparent that this happened. So remove the cases where GitX would pull just a single branch and always pull all the tracking branches.
The current checked out branch will still be updated as normal.
-s or --search= for searching in subject, author or SHA
-S or --Search= for git's pickaxe string matching
-r or --regex= for git's pickaxe regex matching
Sending the arguments with the openURL:... message allows the repository document to modify it's UI without the UI flashing between states as it opens.
Covers all the existing functionality of the CLI, but modifies:
- "--all" "--local" "--branch" change the branch filter
- cleaned up the usage (help) text and added info on missing commands
- looks up the full ref name of refs so the name of a branch or tag can be entered (the user can enter "master" instead of "refs/heads/master")
Modified the History Controller to watch for and react to branch filter changes.
The GitX.h file is generated by the 'sdp' tool in a run script build phase called 'Generate Scripting Bridge Header' based on the content of GitX.sdef. It is used by the Scripting Bridge so that other apps (in this case the gitx CLI) can call Applescript commands on GitX in objective-c.
The cleanup method cancels any background threads and removes KV observers when the repository document is closed.
Also removed KV observers that are no longer needed.
This is a convenience class to replace using NSStrings to store and compare SHAs. PBGitSHA has a much faster isEqual: function.
It is <NSCopying> compliant and implements isEqual: and hash so it can be used as a key in dictionaries.
Use the cached commit list to avoid asking git for the info. This is used to update GUI buttons and when opening the contextual menu so making it fast is important. It wasn't possible before because we weren't storing all the commits.
- filters for All, Local/Remote, and the selected branch
- "Local" includes both branches and tags
- "Remote" includes all branches from the same remote as the selected remote branch (i.e. not other remotes)
Changes to make the above work:
- add a history list class between the repository and rev list
- store a project rev list with all the commits from the project
- use the project rev list to graph the history for individual branches when there have been no changes
- use a different rev list to show non-simple revs (history of a file, revs from the gitx tool)
- update the commits in chunks to a mutable array so the table view's array controller has less work to do
- only update the project rev list from git when actually necessary
- don't add the All Branches and Local Branches revs to the branches array
- some changes related to forcing the project's rev list to update when changes are made
- some changes related to not causing updates too often
- store the selected filter in user defaults
- when the graphing is done select the commit for the branch
In reloadRefs:
- check for any branches that are no longer in the repo and delete them
- except the detached HEAD and the "other" revs
- send KVO notice for the refs ivar changing
- get rid of the BOOL return value as it's not being used
- get rid of the outdated comments
- clean things up a bit
- NSCopying
- change isEqualTo: to isEqual: so that it works well with NSArray's (containsObject: and removeObject: will use isEqual: instead of pointer equality)
- add hash to go with isEqual:
- pre-calculate the isSimpleRef value. The rangeOf... methods are very slow and have a major effect on the tight loop in reloadRefs.