diff options
author | Paul Dagnelie <pcd@delphix.com> | 2016-03-31 21:50:08 -0700 |
---|---|---|
committer | Matthew Ahrens <mahrens@delphix.com> | 2016-04-01 08:41:24 -0700 |
commit | ad20b230af4d39149ceb8bf412ddc9ff0deff2e0 (patch) | |
tree | b98f77df9a98e1c2318b066bce21f2731934019c /usr/src/tools/scripts/git-pbchk.py | |
parent | f62993d998928aca2c5cb44d9f5c0d06ea0b4d33 (diff) | |
download | illumos-gate-ad20b230af4d39149ceb8bf412ddc9ff0deff2e0.tar.gz |
6737 pbchk checks unmodified files
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Diffstat (limited to 'usr/src/tools/scripts/git-pbchk.py')
-rw-r--r-- | usr/src/tools/scripts/git-pbchk.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index fd16e109b2..def3b2617e 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -19,6 +19,7 @@ # Copyright 2008, 2012 Richard Lowe # Copyright 2014 Garrett D'Amore <garrett@damore.org> # Copyright (c) 2014, Joyent, Inc. +# Copyright (c) 2015 by Delphix. All rights reserved. # import getopt @@ -163,7 +164,9 @@ def git_file_list(parent, paths=None): ret = set() for fname in p: - if fname and not fname.isspace() and fname not in ret: + res = git("diff %s HEAD %s" % (parent, fname)) + empty = not res.readline() + if fname and not fname.isspace() and fname not in ret and not empty: ret.add(fname.strip()) return ret |