diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-11-02 17:20:26 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-07 14:05:36 +0000 |
commit | 948d28e80101f26715b67dea169dbbd81dd37f91 (patch) | |
tree | cdc2ad9b4df0943c02ae8c554bd6db3d36bf3df7 /scripts | |
parent | 25fc202e213e844334c680a35d7068c202e05aba (diff) | |
download | openembedded-core-contrib-948d28e80101f26715b67dea169dbbd81dd37f91.tar.gz |
scripts/combo-layer: fix dirty repo check
Fix the dirty repository check to detect any changes, including
untracked files and uncommitted changes in the index.
(From OE-Core rev: f03fa8bbafa82ce6b09c08bf86011b6c51eb3531)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/combo-layer | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer index 4cb9ee072b..f3480dcf5a 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -138,12 +138,8 @@ def check_repo_clean(repodir): check if the repo is clean exit if repo is dirty """ - try: - runcmd("git diff --quiet", repodir) - #TODO: also check the index using "git diff --cached" - # but this will fail in just initialized git repo - # so need figure out a way - except: + output=runcmd("git status --porcelain", repodir) + if output: logger.error("git repo %s is dirty, please fix it first", repodir) sys.exit(1) |