Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Classes/Controllers/PBGitCommitController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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"];
Expand Down