Only do object-id substitution on a properly isolated hex string

Mildly faster commit-cleaning on R2? More correct in any case.

New regex:
Found 48196 commits
Cleaning commits:       100% (48196/48196)
Cleaning commits completed in 106,191 ms.

Old regex:
Found 48196 commits
Cleaning commits:       100% (48196/48196)
Cleaning commits completed in 113,862 ms.