sha1_name: make wraparound of the index into ring-buffer explicit