mirror of
https://git.ludikovsky.name/git/fugitive.git
synced 2024-06-16 08:35:34 +02:00
preventing commit or pushing with zero article
This commit is contained in:
parent
bf9e081956
commit
635f3a1b46
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue