I started this series in early December, after getting annoyed that we still have a function called sha1_pos(). But before I got a chance to polish it, it became hash_pos(). That removed most of my annoyance, though I do still like the type-safety that using object_id brings. And of course there were some interesting cleanups along the way. So I decided to rebase and send it anyway. I think one could argue that hash_pos() is a better interface because a caller _could_ use it without an object_id. But in practice we do not seem to do so (the one exception is rerere, but I ended up refactoring that away anyway). So here it is. Possibly code churn, possibly cleanup. Opinions welcome. :) [1/6]: commit_graft_pos(): take an oid instead of a bare hash [2/6]: rerere: check dirname format while iterating rr_cache directory [3/6]: rerere: tighten rr-cache dirname check [4/6]: rerere: use strmap to store rerere directories [5/6]: hash_pos(): convert to oid_pos() [6/6]: oid_pos(): access table through const pointers builtin/name-rev.c | 10 +++--- commit-graph.c | 30 +++++++++--------- commit.c | 18 +++++------ commit.h | 2 +- hash-lookup.c | 18 +++++------ hash-lookup.h | 10 +++--- oid-array.c | 8 ++--- pack-bitmap-write.c | 8 ++--- rerere.c | 75 ++++++++++++++++++++------------------------- shallow.c | 2 +- 10 files changed, 87 insertions(+), 94 deletions(-) -Peff