The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Commit parent order has meaning in our use case. The branch that gets merged
into is always the first commit in the parents list. Up until this change, the
noms layer stores commit parents as a Set, which is unordered and orders the
parents based on their commit hash.
This changes commit struct to carry both parents Set and parentsList List.
CommitOptions supplies a ParentsList, but both get stored for backwards
compatibility with existing dolt clients.
This change does not include changes to start using the stored parentsList in
things like ancestor traversal or `dolt log`. The intended migration is that
the read logic will read from `parentsList` in a commit if it is present, and
will fall back to the `parents` Set if it is not.
Eventually we will be able to migrate to not writing `parents` Set anymore.
There is no current plan to drop support for reading `parents` Set when
`parentsList` is not available.
The existing noms codebase uses panics for signaling errors in most cases. This is not idiomatic go, and it is not the optimal behavior when building cloud services, or products on top of noms as a panic in any go routine causes the entire process to exit.
This is a large step in removing panics, and bubbling errors up through the code.
Standardize parameter name for *NomsBinFormat to nbf. Standardize `nbf` as
first (after `ctx`) parameter. Remove unnecessary `nbf` parameters when format
is available from incoming `Value` or `ValueReader`.