Esanders has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203660
Change subject: Show full diff when grunt git-status fails
......................................................................
Show full diff when grunt git-status fails
Change-Id: I3dc863b1be836099e1cd13819e2def0b2e8eb436
---
M Gruntfile.js
1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/60/203660/1
diff --git a/Gruntfile.js b/Gruntfile.js
index 2632a99..76c8a79 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -234,9 +234,13 @@
require( 'child_process' ).exec( 'git ls-files --modified',
function ( err, stdout, stderr ) {
var ret = err || stderr || stdout;
if ( ret ) {
- grunt.log.write( ret );
- grunt.log.error( 'Unstaged changes.' );
- done( false );
+ grunt.log.error( 'Unstaged changes in these
files:' );
+ grunt.log.error( ret );
+ // Show a condensed diff
+ require( 'child_process' ).exec( 'git diff -U1
| tail -n +3', function ( err, stdout, stderr ) {
+ grunt.log.write( err || stderr ||
stdout );
+ done( false );
+ } );
} else {
grunt.log.ok( 'No unstaged changes.' );
done();
--
To view, visit https://gerrit.wikimedia.org/r/203660
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dc863b1be836099e1cd13819e2def0b2e8eb436
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits