webapp: allow git-like hash truncation