Permalink
Browse files

CommitController: Make commit message editable after commit failed

  • Loading branch information...
1 parent 59d4a15 commit e17b454c39d7556f2d676d424496e3f68b7f16fe @pieter committed Sep 13, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 PBGitCommitController.m
View
5 PBGitCommitController.m
@@ -126,9 +126,9 @@ - (IBAction) commit:(id) sender
[unstagedFilesController setSelectionIndexes:[NSIndexSet indexSet]];
self.busy = YES;
+ [commitMessageView setEditable:NO];
[index commitWithMessage:commitMessage];
- [commitMessageView setEditable:NO];
}
@@ -145,16 +145,17 @@ - (void)commitStatusUpdated:(NSNotification *)notification
- (void)commitFinished:(NSNotification *)notification
{
+ [commitMessageView setEditable:YES];
[commitMessageView setString:@""];
[webController setStateMessage:[NSString stringWithFormat:[[notification userInfo] objectForKey:@"description"]]];
- [commitMessageView setEditable:YES];
}
- (void)commitFailed:(NSNotification *)notification
{
self.busy = NO;
NSString *reason = [[notification userInfo] objectForKey:@"description"];
self.status = [@"Commit failed: " stringByAppendingString:reason];
+ [commitMessageView setEditable:YES];
[[repository windowController] showMessageSheet:@"Commit failed" infoText:reason];
}

0 comments on commit e17b454

Please sign in to comment.