-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show diff for the dirty build. #3885
Conversation
@@ -162,6 +162,13 @@ public function checkDirty(array $options = ['ignore-dirty' => FALSE]) { | |||
$this->logger->warning("There are uncommitted changes on the source repository."); | |||
} | |||
else { | |||
if ($options['verbose']) { | |||
$this->taskExec('git diff --exit-code') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say git status
is less verbose. In this case you probably care most about what files are changed, not the diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @alexxed !
Thank you for your review.
Yes git status
is less verbose.
Therefore, it is not always clear what exactly has changed. I gave an example with settings.php
There are several behaviors that can lead to changes in the build.
- If a Drupal installer is running, a line with the type of the installed profile may be added.
- File permissions may change.
- A line with blt is added to the end of the file
Not all such changes are understandable when viewing git status.
In addition, when an error is found, more information gives more power to solve it.
Is it make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the screenshot I see it's a CI, so it makes sense to get as much info as possible automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexxed great, thanks!
What is the next step to processed it?
Fixes #3564
Changes proposed
Print diff information for the dirty build.
Steps to replicate the issue
Previous (bad) behavior, before applying PR
BLT showed only file was changed and not what actually changed in those files.
It can be difficult to debug what gone un.
Like this https://prnt.sc/phxpjb
Expected behavior, after applying PR and re-running test steps
BLT will show changes, like this https://prnt.sc/phxmyz
Additional details
Those changes can save a lot of time, which needed to resolved unclear bugs.