1
0
Fork 0
mirror of https://git.ludikovsky.name/git/fugitive.git synced 2024-05-18 14:35:32 +02:00

preventing commit or pushing with zero article

This commit is contained in:
p4bl0 2010-08-10 19:32:16 +02:00
parent bf9e081956
commit 635f3a1b46

View file

@ -35,6 +35,11 @@ for f in "$articles_dir"/*; do
fi
done | sort -nr | cut -d' ' -f2 > "$articles_sorted"
if [ "`head -1 $articles_sorted`" = "" ]; then
echo "[fugitive] Need at least one article, aborting." >&2
exit 1
fi
articles_sorted_with_delete=`mktemp --suffix "-fugitive"`
for f in "$articles_dir"/* $deleted_files; do
ts=`git log --format="%at" -- "$f" | tail -1`