Last active
November 18, 2015 03:34
-
-
Save cjsewell/36c8a7ff1a608cf18299 to your computer and use it in GitHub Desktop.
Find Silverstripe modules which have uncommitted changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$gitDirs = array_merge(glob('*/.git', GLOB_ONLYDIR), glob('themes/*/.git', GLOB_ONLYDIR)); | |
$origWorkingDir = getcwd(); | |
foreach ($gitDirs as $dir) { | |
chdir(dirname($dir)); | |
$getStatus = shell_exec("git status -s"); | |
if ($getStatus) { | |
echo dirname($dir) . PHP_EOL; | |
} | |
chdir($origWorkingDir); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Intended to be called from the command line in your project directory
eg