Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Drupal/Commands/config/ConfigCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ public function status($options = ['state' => 'Only in DB,Only in sync dir,Diffe
$storage = $this->getStorage($directory);
$state_map = [
'create' => 'Only in DB',
'update' => 'Only in sync dir',
'delete' => 'Different',
'update' => 'Different',
'delete' => 'Only in sync dir',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any chance that Create and Delete are flipped? In the context of an import, if a file is only in sync dir that will lad to a 'create', not a 'delete'.

Copy link
Collaborator Author

@Chi-teck Chi-teck Oct 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it only depends on the order of parameters passed to StorageComparer constructor.

Drush passes active storage in first parameter, so it is considered as source (storage object used to read configuration).
https://github.com/drush-ops/drush/blob/9.0.0-beta7/src/Drupal/Commands/config/ConfigCommands.php#L320

];
foreach ($this->getChanges($storage) as $collection) {
foreach ($collection as $operation => $configs) {
Expand All @@ -257,8 +257,8 @@ public function status($options = ['state' => 'Only in DB,Only in sync dir,Diffe
$rows = [];
$color_map = [
'Only in DB' => 'green',
'Only in sync dir' => 'yellow',
'Different' => 'red',
'Only in sync dir' => 'red',
'Different' => 'yellow',
'Identical' => 'white',
];

Expand Down