mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
21d1f3989f
This enables the user to force a commit (i.e. --no-verify) when either pre-commit or commit-msg hook fails.
39 lines
1.0 KiB
Objective-C
39 lines
1.0 KiB
Objective-C
//
|
|
// 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
|