commit: ce959f39c8dcb655b8455356f4b8f22888e73ba8 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Wed Sep 21 21:31:35 2016 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Wed Sep 21 21:31:35 2016 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=ce959f39
vc: Sync from dev-tex/vc-0.5-r1. vc | 2 +- vc-git.awk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vc b/vc index 5eb7f0f..4e13d71 100644 --- a/vc +++ b/vc @@ -20,5 +20,5 @@ LC_ALL=C git --no-pager log -1 HEAD --pretty=format:"Hash: %H%nAbr. Hash: %h%nParent Hashes: %P%nAbr. Parent Hashes: %p%nAuthor Name: %an%nAuthor Email: %ae%nAuthor Date: %ai%nCommitter Name: %cn%nCommitter Email: %ce%nCommitter Date: %ci%n" |gawk -v script=log -v full=$full -f vc-git.awk > vc.tex if [ "$mod" = 1 ] then - git status |gawk -v script=status -f vc-git.awk >> vc.tex + git status --porcelain |gawk -v script=status -f vc-git.awk >> vc.tex fi diff --git a/vc-git.awk b/vc-git.awk index d349a93..8b9b052 100644 --- a/vc-git.awk +++ b/vc-git.awk @@ -24,9 +24,9 @@ script=="log" && /^Committer Date:/ { CommitterDate = substr($0, 2+match($0, ":" ### Process output of "git status". ### Changed index? -script=="status" && /^# Changes to be committed:/ { modified = 1 } +script=="status" && /^[MADRC]/ { if (modified == 0) modified = 1 } ### Unstaged modifications? -script=="status" && /^# Changed but not updated:/ { modified = 2 } +script=="status" && /^.[MD]/ { modified = 2 }