-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.
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
Checkout:
- PBGitRepository: add checkoutRefish:
- PBRefController: renamed checkoutRef: to checkout: and use new method in PBGitRepository
- add to the contextual menus for commits (it was already in the menu for refs)
- add "Checkout branch" checkbox to the Create Branch sheet
- store the state in the defaults
- tell the commitController to rearrangeObjects so that the refs highlight correctly (seems to only be a problem when going from a branch to a detached HEAD at the same commit)
A Create Tag item:
- A new class (and xib) PBCreateTagSheet
- In the Repository menu
- In the contextual menu for commits
PBRefController the method tagInfo:
- renamed to showTagInfoSheet:
- moved it under the Tags mark
Update the methods for creating a branch.
- create new class and xib PBCreateBranchSheet
- remove old addRef: methods and iVars from PBRefController
- remove old sheet from PBHistoryView.xib
- put the implementation method in PBGitRepository
- add a contextual menu item for commits
- shows an error sheet
- ask the commitController to rearrangeObjects to make sure the new branch is shown
- switch from using "update-ref" to "branch" so that branches starting at a remote branch will track automatically (or not depending on the repo's settings)
This adds a removeBranch method similar to the addBranch method. It
calls these methods when a branch is created/deleted in the UI, avoiding
the cost of simply calling refresh afterwards.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
* stable:
When selecting a folder in tree-view, display the
PBGitRepository: Correctly indicate bare/non-bare repos
Get rid of some unnecessary casts
CommitController: Don't rewrap commit message when amending
Release notes for 0.6.3
PBGitCommit: Call git show with --no-color to be safe
Info.plist: Fix handling of directories
PBGitIndexController: fix uninitialized value
Conflicts:
PBGitCommitController.m
Some hooks, such as commit-msg and
prepare-commit-msg require at least one argument.
This allows executeHook to take an array of
arguments to be passed on to the hook.
We already keep this dictionary in our repository. Rather than adding a
pointer to it on every commit in our rev walk, just look it up lazily in the
dictionary when we need to. That cuts down some time in the initial revwalk
and also removes some stupid code :)