From 18457e886dee493c2e8d44146d10a79cc1e57c3b Mon Sep 17 00:00:00 2001 From: p4bl0 Date: Sat, 21 May 2011 14:24:20 +0200 Subject: BUGFIX: generated html for articles added in a commit with template changes were not added to ignore list --- html-gen.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'html-gen.sh') diff --git a/html-gen.sh b/html-gen.sh index 2079b29..ea9328f 100644 --- a/html-gen.sh +++ b/html-gen.sh @@ -12,15 +12,16 @@ preproc=`git config --get fugitive.preproc` tpl_change=`echo "$added_files" "$modified_files" "$deleted_files" | \ grep -c "$templates_dir/"` if [ "$tpl_change" -gt 0 ]; then - added_files= - modified_files=`git log --name-status --pretty="format:" | \ + first=`git log --format="%H" --reverse | head -1` + modified_files=`git log $first..HEAD^ --name-status --pretty="format:" | \ grep -E '^A' | cut -f2 | sort | uniq` deleted_files= tmpart=`mktemp` tmpmod=`mktemp` + tmpadd=`mktemp` ls "$articles_dir"/* > "$tmpart" echo "$modified_files" | tr " " "\n" > "$tmpmod" - modified_files=`comm -12 --nocheck-order "$tmpmod" "$tmpart"` + modified_files=`comm -12 --nocheck-order "$tmpmod" "$tmpart"` rm "$tmpart" "$tmpmod" echo "[fugitive] Templates changed, regenerating everything..." fi -- cgit v1.2.3