diff --git a/PBGitCommitController.m b/PBGitCommitController.m index f41ffe2..d74e2a5 100644 --- a/PBGitCommitController.m +++ b/PBGitCommitController.m @@ -318,6 +318,11 @@ - (IBAction) commit:(id) sender { + if ([[NSFileManager defaultManager] fileExistsAtPath:[repository.fileURL.path stringByAppendingPathComponent:@"MERGE_HEAD"]]) { + [[repository windowController] showMessageSheet:@"Cannot commit merges" infoText:@"GitX cannot commit merges yet. Please commit your changes from the command line."]; + return; + } + if ([[cachedFilesController arrangedObjects] count] == 0) { [[repository windowController] showMessageSheet:@"No changes to commit" infoText:@"You must first stage some changes before committing"]; return;