Reverse the order of storing commit, tree and blobs

Apply-object inserts commits, trees and blobs into the repository.
These writes are not transactional this means that if any of these
writes fails previous ones are not reverted. This can cause
repository corruption because we end up with a commit pointing to
a non existing tree or blob.
The revised logic safeguards the repository from corruption by
mandating the order of insertion as follows:
1. Blobs
2. Trees
3. Commits

With this order even if the insertion fails it will keep the
repository healthy and the git GC will clean up dangling
objects.

Bug: Issue 306464772
Change-Id: I761e84d5e518e3c3b8ab9c151996149e5d466378
1 file changed
tree: d3eec5ab441bd55b9e61750e3f7a8ff96762de81
  1. example-setup/
  2. src/
  3. .gitignore
  4. BUILD
  5. Jenkinsfile
  6. LICENSE