Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
Merge even if last export made no change, because some config exports…
Browse files Browse the repository at this point in the history
… may have already been committed
  • Loading branch information
gaelg committed Nov 9, 2015
1 parent 19fb9d0 commit 255f6b4
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions config_extra.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -209,22 +209,8 @@ function drush_config_extra_config_merge($alias = '', $config_label = 'sync') {
return FALSE;
}

// Check to see if the export changed any files. If it did not, then
// skip the merge, and process only the config pulled in from the other site.
// TODO: This needs to be a diff against the base commit. In 'git' mode,
// we probably want to just skip this test and always merge. Maybe always do this?
$configuration_path = _drush_cme_get_configuration_path($merge_info);
$result = drush_shell_cd_and_exec($configuration_path, 'git status --porcelain .');
if (!$result) {
return drush_set_error('DRUSH_CONFIG_MERGE_FAILURE', dt("`git status` failed."));
}
$changed_configuration_files = drush_shell_exec_output();
if (empty($changed_configuration_files)) {
drush_log(dt("No configuration changes on !site; no merge necessary.", array('!site' => $merge_info['dev-site'])), 'ok');
}
else {
$result = _drush_cme_merge_local_and_remote_configurations($merge_info);
}
$result = _drush_cme_merge_local_and_remote_configurations($merge_info);

if ($result === FALSE) {
return FALSE;
}
Expand Down

0 comments on commit 255f6b4

Please sign in to comment.