diff --git a/Classes/Controllers/PBGitCommitController.m b/Classes/Controllers/PBGitCommitController.m index 062cbd205..69d3a9795 100644 --- a/Classes/Controllers/PBGitCommitController.m +++ b/Classes/Controllers/PBGitCommitController.m @@ -159,7 +159,7 @@ - (void) commitWithVerification:(BOOL) doVerify } NSString *commitMessage = [commitMessageView string]; - if ([commitMessage length] < 3) { + if ([commitMessage length] == 0) { [[repository windowController] showMessageSheet:@"Commitmessage missing" infoText:@"Please enter a commit message before committing"]; return; } @@ -213,9 +213,8 @@ - (void)commitHookFailed:(NSNotification *)notification - (void)amendCommit:(NSNotification *)notification { - // Replace commit message with the old one if it's less than 3 characters long. - // This is just a random number. - if ([[commitMessageView string] length] > 3) + // Replace commit message with the old one if it's empty. + if ([[commitMessageView string] length] > 0) return; NSString *message = [[notification userInfo] objectForKey:@"message"];