Fossil: use internal diff (fossil diff -i)

Thanks to @sekiroh for the tip...
This commit is contained in:
Olivier Mengué 2014-02-20 21:35:57 +01:00
parent f24a41d911
commit c71abe49a5

View File

@ -957,7 +957,7 @@ _lp_fossil_branch_color()
local ret local ret
C2E=$(fossil changes | wc -l) C2E=$(fossil changes | wc -l)
C2A=$(fossil extras | wc -l) C2A=$(fossil extras | wc -l)
ret=$(fossil diff -v | awk "/^(+[^+])|(+$)/ { plus+=1; } /^(-[^-])|(-$)/ { minus+=1; } END { total=\"\"; if(plus>0){ total=\"+\"plus; if(minus>0) total=total\"/\"; } if(minus>0) total=total\"-\"minus; print total;}") ret=$(fossil diff -i -v | awk "/^(+[^+])|(+$)/ { plus+=1; } /^(-[^-])|(-$)/ { minus+=1; } END { total=\"\"; if(plus>0){ total=\"+\"plus; if(minus>0) total=total\"/\"; } if(minus>0) total=total\"-\"minus; print total;}")
if (( C2E > 0 )); then if (( C2E > 0 )); then
[[ -n "$ret" ]] && ret+=" in " [[ -n "$ret" ]] && ret+=" in "