mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Add Diff to contextual menus
- added to menus for refs, commits, and files
- show a message when there are no changes
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#import "PBCreateBranchSheet.h"
|
||||
#import "PBCreateTagSheet.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "PBDiffWindowController.h"
|
||||
|
||||
@implementation PBRefController
|
||||
|
||||
@@ -204,6 +205,19 @@
|
||||
}
|
||||
|
||||
|
||||
#pragma mark Diff
|
||||
|
||||
- (void) diffWithHEAD:(PBRefMenuItem *)sender
|
||||
{
|
||||
PBGitCommit *commit = nil;
|
||||
if ([[sender refish] refishType] == kGitXCommitType)
|
||||
commit = (PBGitCommit *)[sender refish];
|
||||
else
|
||||
commit = [historyController.repository commitForRef:[sender refish]];
|
||||
|
||||
[PBDiffWindowController showDiffWindowWithFiles:nil fromCommit:commit diffCommit:nil];
|
||||
}
|
||||
|
||||
#pragma mark Tags
|
||||
|
||||
- (void) createTag:(PBRefMenuItem *)sender
|
||||
|
||||
Reference in New Issue
Block a user