mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-23 10:19:35 +00:00
build: Bring over git-status improvements from core
Change-Id: I34a55cf0e35175ee95eb3d56aefd64733fc86c7c
This commit is contained in:
parent
ed936bdb11
commit
086535875f
10
Gruntfile.js
10
Gruntfile.js
|
@ -95,9 +95,13 @@ module.exports = function ( grunt ) {
|
|||
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();
|
||||
|
|
Loading…
Reference in a new issue