Specifying these helps to improve DO performance and it should also help
with the NSURL passed byref thingy (see PBCLIProxy.m), although we don't
really need that anymore because we changed the parameters to be NSString's
which by default are passed bycopy.
Specifying "oneway void" creates a fire-and-forget situation where the
distant object will not wait for the value returned.
in PBGitHistoryController, since this will prevent commit list selection
changes while a deferred selection is undergoing.
A deferred selection is processed when a launch from CLI occurrs with CLI
args containing strings like "<SHA>", or "--subject=<word>", etc.
(see gitx.m).
What happens is that a 0.5s delayed selector will be performed from the
ApplicationController after the CLI args where processed. After this has
happened, launchedFromGitx will be NO and thus KVO can continue as it
normally would.
Add method decl signatures for updateKeys and scrollSelectionToTopOfViewFrom:
- Call preferencesChangedWithNotification: on self when the notification is
received. This gives us the opportunity to refresh the history controller's
commit list in case defaults like the relative dates option have changed.
This makes the effect of switching that option while the prefs panel is still
open instant.
- Change return type from void to BOOL to convey if selecting succeeded
or not.
- Return NO if the cliArgs from sharedApplicationController contain "--commit",
since then we need to just show the commit stage. Updating the commit list
selection is not necessary. In fact, it will confuse order among consequent
calls.
- If the oldIndex equals NSNotFound, try to get the index of the currently
selected object by finding it among the content object of the commitController.
If we find it we save the result in an ivar called selectedCommit so that
subsequent calls will always have this available as an alternative back-up
plan.
- Rearrange some ivar declarations and bunch IBOutlets etc. together for better
visual acuity.
- Add readonly properties for searchField, commitList and webView.
These use BMScript which may be overkill considering we have like a whole load
of PBEasyPipe commands and their wrappers in the repository but I just found for
one or two tasks where I really had to work with a full featured shell script
PBEasyPipe was a bit limited.
- Add a shaExists method that takes string with a SHA and either returns the full
SHA if it exists or nil if not.
- Add a completeRefForString: method which completes partial refs like "xyz/master"
to "refs/remotes/xyz/master" for example.
- Add a checkRefFormatForBranch: method which does the same as checkRefFormat
except it also works with partial branch refs like "xyz/master".
- Add headRefForSHA skeleton to encapsulate the shell-script-fu from populateList
in PBGitSidebarController that deals with getting the head ref for a SHA.
If the current branch filter is switched to "All" or "Local" the index that's
calculated as being the targeted index to scroll to visible, is off by the amount
in Y that the bottom split view separator is off from a multiple of rows.
-adjustScroll: on PBCommitList is called automatically whenever the list needs
laying out.
An ivar keeps track if we come from the -scrollSelectionToTopOfViewFrom: method
of PBGitHistoryController.
I'll leave the commented out NSLogs in there in case they're needed for debugging
again later.
Now, I know conceptually the Remotes segmented control was down there because it is
related to the repository and the current branch, but I really grew tired having to
travel all the way down the monitor real estate just to click a button.
And you can't just fast travel down, you need be quite specific with the click.
Edit install.sh to use gitx_askpasswd so that a password dialog is shown whenever
sudo is used in the install script.
Also split the install logic in install.sh based on BUILD_STYLE so that
installing GitX and gitx (CLI) is possible each on its own.
I was confusing KVO with Notifications earlier, as the GC Programming Guide
explicitly says one should not unregister notifications in a finalize method
when using GC.
To do this we use a modified gitx_askpasswd to ask for sudo permissions during build.
Modifications to gitx_askpasswd include:
- Ability to specify the dialog info text (or title) via STDIN or a GITX_ASKPASSWD_DIALOG_TITLE env variable.
Install.sh uses the env var in 'sudo -A -E' to kindly request the password.
The point of this is to provide a sensible title which lets the user/dev know why he has to enter his password in a dialog that is obviously not from Mac OS X.
Install.sh will now also create the folder hierarchy needed for the install paths set in Install.xcconfig using 'sudo -A -E' if neccessary (if the folders don't exist).
Since xcconfigs can include other configs you get the same functionality that Xcode's
build settings give you but with much more clarity. And it's much better for SCM,
especially decentralized ones like git.
Changes:
- Archs is set to ppc i386 x86_64
- libgit2 is now compiled including -arch x86_64.
- LTO is off (caused a Rel32 address space error when linking)
- Default compiler is now LLVM GCC4.2 since Clang is not quite ready for Objective C++.
(and we have some .mm files in there)
- Based on: settings on Xcode's build settings dialogs are set according to the name
of the xcconfig file. (project settings are based on Common.xcconfig)
- Deleted all the overwritten settings (bold font display) that are now defined through
the xcconfigs.
My guess is that this is caused by the rather large buffer size of 2000.
Since we know that a full SHA will never be longer than 40+1 bytes, we simply use
a default define from libgit2 for the buffer size.