ignore empty files when looking for unchanged files
Change-Id: Iddc83ff475762dba885db03734933276498f7c5b Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
2202c9b287
commit
9ecc088e06
@ -62,18 +62,36 @@ function count_files() {
|
||||
git ls-files | wc -l
|
||||
}
|
||||
|
||||
function shas_at_tag() {
|
||||
# Produce a list of shas used by objects at the tag point
|
||||
function git_ls_tree() {
|
||||
local tag="$1"
|
||||
local extension="$2"
|
||||
|
||||
if [ -z "$extension" ]; then
|
||||
git ls-tree -lr $tag | cut -f3 -d' '
|
||||
git ls-tree -lr $tag
|
||||
else
|
||||
git ls-tree -lr $tag | grep ${extension}'$' | cut -f3 -d' '
|
||||
git ls-tree -lr $tag | grep ${extension}'$'
|
||||
fi
|
||||
}
|
||||
|
||||
function shas_at_tag() {
|
||||
# Produce a list of shas used by objects representing files with
|
||||
# real content at the tag point
|
||||
local tag="$1"
|
||||
local extension="$2"
|
||||
|
||||
local mode
|
||||
local type
|
||||
local sha
|
||||
local size
|
||||
local filename
|
||||
|
||||
git_ls_tree $tag $extension | while read mode type sha size filename; do
|
||||
if [ "$size" != "0" ]; then
|
||||
echo $sha
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function count_unchanged_files() {
|
||||
local start="$1"
|
||||
local end="$2"
|
||||
|
Loading…
Reference in New Issue
Block a user