forked from brotherbard/gitx
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a dialog for failing commit hooks
This enables the user to force a commit (i.e. --no-verify) when either pre-commit or commit-msg hook fails.
- Loading branch information
Showing
12 changed files
with
1,425 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// PBCommitHookFailedSheet.h | ||
// GitX | ||
// | ||
// Created by Sebastian Staudt on 9/12/10. | ||
// Copyright 2010 Sebastian Staudt. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
#import "PBGitCommitController.h" | ||
#import "PBGitXMessageSheet.h" | ||
|
||
|
||
@interface PBCommitHookFailedSheet : PBGitXMessageSheet | ||
{ | ||
PBGitCommitController *commitController; | ||
} | ||
|
||
+ (void)beginMessageSheetForWindow:(NSWindow *)parentWindow withMessageText:(NSString *)message infoText:(NSString *)info commitController:(PBGitCommitController *)controller; | ||
|
||
- (id)initWithWindowNibName:(NSString *)windowNibName andController:(PBGitCommitController *)controller; | ||
- (IBAction)forceCommit:(id)sender; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// PBCommitHookFailedSheet.m | ||
// GitX | ||
// | ||
// Created by Sebastian Staudt on 9/12/10. | ||
// Copyright 2010 Sebastian Staudt. All rights reserved. | ||
// | ||
|
||
#import "PBCommitHookFailedSheet.h" | ||
#import "PBGitWindowController.h" | ||
|
||
|
||
@implementation PBCommitHookFailedSheet | ||
|
||
#pragma mark - | ||
#pragma mark PBCommitHookFailedSheet | ||
|
||
+ (void)beginMessageSheetForWindow:(NSWindow *)parentWindow withMessageText:(NSString *)message infoText:(NSString *)info commitController:(PBGitCommitController *)controller | ||
{ | ||
PBCommitHookFailedSheet *sheet = [[self alloc] initWithWindowNibName:@"PBCommitHookFailedSheet" andController:controller]; | ||
[sheet beginMessageSheetForWindow:parentWindow withMessageText:message infoText:info]; | ||
} | ||
|
||
- (id)initWithWindowNibName:(NSString *)windowNibName andController:(PBGitCommitController *)controller; | ||
{ | ||
self = [self initWithWindowNibName:windowNibName]; | ||
commitController = controller; | ||
|
||
return self; | ||
} | ||
|
||
- (IBAction)forceCommit:(id)sender | ||
{ | ||
[self closeMessageSheet:self]; | ||
[commitController forceCommit:sender]; | ||
} | ||
|
||
@end |
Oops, something went wrong.