mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user