show unchanged python files separately
Change-Id: Ibc7cf94a5ed6695f3ee2cbb9328a858d8c568f10 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
ab9441327b
commit
2202c9b287
@ -64,14 +64,24 @@ function count_files() {
|
||||
|
||||
function shas_at_tag() {
|
||||
# Produce a list of shas used by objects at the tag point
|
||||
git ls-tree -lr $1 | cut -f3 -d' '
|
||||
local tag="$1"
|
||||
local extension="$2"
|
||||
|
||||
if [ -z "$extension" ]; then
|
||||
git ls-tree -lr $tag | cut -f3 -d' '
|
||||
else
|
||||
git ls-tree -lr $tag | grep ${extension}'$' | cut -f3 -d' '
|
||||
fi
|
||||
}
|
||||
|
||||
function count_unchanged_files() {
|
||||
local start="$1"
|
||||
local end="$2"
|
||||
local extension="$3"
|
||||
|
||||
comm -12 <( shas_at_tag $start | sort ) <( shas_at_tag $end | sort ) | wc -l
|
||||
comm -12 <( shas_at_tag $start "$extension" | sort ) \
|
||||
<( shas_at_tag $end "$extension" | sort ) \
|
||||
| wc -l
|
||||
}
|
||||
|
||||
for repo in $REPOS; do
|
||||
@ -101,6 +111,7 @@ for repo in $REPOS; do
|
||||
echo
|
||||
|
||||
echo "Unchanged files: $(count_unchanged_files $base $latest)"
|
||||
echo "Unchanged .py files: $(count_unchanged_files $base $latest .py)"
|
||||
echo
|
||||
|
||||
cd $MYTMPDIR
|
||||
|
Loading…
x
Reference in New Issue
Block a user