Skip to content

Commit e17b454

Browse files
committed
CommitController: Make commit message editable after commit failed
1 parent 59d4a15 commit e17b454

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

PBGitCommitController.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ - (IBAction) commit:(id) sender
126126
[unstagedFilesController setSelectionIndexes:[NSIndexSet indexSet]];
127127

128128
self.busy = YES;
129+
[commitMessageView setEditable:NO];
129130

130131
[index commitWithMessage:commitMessage];
131-
[commitMessageView setEditable:NO];
132132
}
133133

134134

@@ -145,16 +145,17 @@ - (void)commitStatusUpdated:(NSNotification *)notification
145145

146146
- (void)commitFinished:(NSNotification *)notification
147147
{
148+
[commitMessageView setEditable:YES];
148149
[commitMessageView setString:@""];
149150
[webController setStateMessage:[NSString stringWithFormat:[[notification userInfo] objectForKey:@"description"]]];
150-
[commitMessageView setEditable:YES];
151151
}
152152

153153
- (void)commitFailed:(NSNotification *)notification
154154
{
155155
self.busy = NO;
156156
NSString *reason = [[notification userInfo] objectForKey:@"description"];
157157
self.status = [@"Commit failed: " stringByAppendingString:reason];
158+
[commitMessageView setEditable:YES];
158159
[[repository windowController] showMessageSheet:@"Commit failed" infoText:reason];
159160
}
160161

0 commit comments

Comments
 (0)