CommitController: Reject merges

We don't support this in any way yet, so let's just
issue a warning rather than failing silently
This commit is contained in:
Pieter de Bie
2009-06-20 21:10:38 +01:00
parent ad2213ce2f
commit d6ccf34881
+5
View File
@@ -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;