- make sure to remove themselves from KV and notification center observers
- add the PBWebHistoryController to PBHistoryController so it can be told to close
- replaced the -removeView methods with -closeView (-removeView was not being used)
- clear any obj-c objects set in web scripting objects
This last item seems to be the reason that the web controllers and the current commit did not get collected which then held the repository document from being collected as well.
This enables a "discard" button for unstaged hunks which simply gets rid of the
changes (by using "git apply --reverse").
To avoid repetition, the stageHunk method was split into a more generic
processHunk method. The "discard" functionality is called through
discardHunk.
The NSAlert shown when discarding can be bypassed by pressing "Alt"
while clicking the discard-button.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This adds a slider in the commit view with
which the user can change the context size.
This is useful for example if the hunks are too
big; by changing the context size, a hunk can be
split and then the changes can be committed.
The message that the commit was succesful used to disappear
because after the commit, the index would refresh and another
file would be shown. We fix this by never requiring a file to be
selected.
This merges functionality that was previously stored in the
combination of PBGitCommitController / PBChangedFile to a
dedicated controller, PBGitIndexController.
This adds a div in the webview to display the current commit
state. It allows us to notify the user of new commits by
showing something in the webview, rather than a modal
dialog.
This changes the HTML part of GitX to be more consistent -- we
now use a "views" directory where every web view has it's own
directory.
Furthermore, GitX-wide Javascript is added in the "lib" directory.
The same is true for CSS in the "css" directory. Every view can
have its own custom CSS and JS, and those are put in the views
directory (without JS or CSS prefix directories).
This causes trouble if a file was partially staged,
or if we switch from the staged changes to the
unstaged changes.
It should be quick enough not to matter anyway, so
let's simplify things and remove the check.