summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-11-02 17:20:26 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-07 13:58:39 +0000
commitf03fa8bbafa82ce6b09c08bf86011b6c51eb3531 (patch)
treefb6d5d56589f6c8cab9a9fc0745a39f3da0f122f /scripts
parent8e2b8b05607103acd539808c5ab0cc80c0d481fc (diff)
downloadopenembedded-core-f03fa8bbafa82ce6b09c08bf86011b6c51eb3531.tar.gz
openembedded-core-f03fa8bbafa82ce6b09c08bf86011b6c51eb3531.tar.bz2
openembedded-core-f03fa8bbafa82ce6b09c08bf86011b6c51eb3531.tar.xz
openembedded-core-f03fa8bbafa82ce6b09c08bf86011b6c51eb3531.zip
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/combo-layer8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 4cb9ee072..f3480dcf5 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)