Skip to content
Snippets Groups Projects

ignore-file-size-gitlfs

Merged Martin Schroschk requested to merge ignore-file-size-gitlfs into preview
1 unresolved thread
#!/bin/bash
#!/bin/bash -x
# BSD 3-Clause License
# BSD 3-Clause License
#
#
@@ -38,8 +38,8 @@ source_hash=`git merge-base HEAD "$branch"`
@@ -38,8 +38,8 @@ source_hash=`git merge-base HEAD "$branch"`
for f in $(git diff $source_hash --name-only); do
for f in $(git diff $source_hash --name-only); do
fs=$(wc -c $f | awk '{print $1}')
fs=$(wc -c $f | awk '{print $1}')
if [ $fs -gt 1048576 ]; then
if [ $fs -gt 1048576 ]; then
echo $f 'is over 1M ('$fs' bytes)'
echo $f 'is over 1M ('$fs' bytes)'
large_files_present=true
large_files_present=true
fi
fi
done
done
Loading