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:
Nathan Kinsinger
2010-02-27 10:06:25 -07:00
parent dc56af4aa6
commit c19d2c8058
10 changed files with 103 additions and 3 deletions
+14
View File
@@ -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