do not rev-parse if ref is already a sha
commit now stores multiple parents, not assuming linear history
added commit cache to avoid redundant calls