File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -4,26 +4,26 @@ var through = require('through2');
4
4
var execSync = require ( 'child_process' ) . execSync ;
5
5
6
6
function diffBranches ( options ) {
7
- var filesChanged = [ ] ;
7
+ var filesChanged = [ ] ;
8
8
9
- if ( ! options . baseBranch ) {
10
- throw new gutil . PluginError ( 'gulp-gitflow-diff' , 'baseBranch param is required' ) ;
11
- }
9
+ if ( ! options . baseBranch ) {
10
+ throw new gutil . PluginError ( 'gulp-gitflow-diff' , 'baseBranch param is required' ) ;
11
+ }
12
12
13
13
var cmd = 'git diff --name-only ' + options . baseBranch + '..HEAD' ;
14
14
filesChanged = execSync ( cmd , { encoding : 'utf8' } ) ;
15
15
filesChanged = filesChanged . split ( "\n" ) ;
16
16
// last entry is just empty string
17
17
filesChanged . pop ( ) ;
18
18
19
- return through . obj (
20
- function ( file , enc , cb ) {
21
- if ( isFileChanged ( file , filesChanged ) ) {
22
- this . push ( file ) ;
19
+ return through . obj (
20
+ function ( file , enc , cb ) {
21
+ if ( isFileChanged ( file , filesChanged ) ) {
22
+ this . push ( file ) ;
23
23
}
24
- cb ( ) ;
25
- }
26
- ) ;
24
+ cb ( ) ;
25
+ }
26
+ ) ;
27
27
} ;
28
28
29
29
function isFileChanged ( file , filesChanged ) {
You can’t perform that action at this time.
0 commit comments