Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very tangential:

Gerrit also stores some of its configs in a git repo. I was setting up a new instance, but couldn't get Admin permissions because the way my auth front-end didn't play well with the docker image's assumptions.

Gerrit already does a lot of its work via non-standard references. For example, you don't push to a branch, `refs/heads/foo`, you push to a separate `refs/for/foo` namespace that creates the review.

Similarly, Group config is stored in the All-Users git repo [1], but in references created after a UUID, in `refs/groups/UU/UUID`.

I ended up having to exercise the plumbiest of plumbing commands [2] to create a new commit from scratch (from a tree, from the index, from blobs), to update the group ref to add myself to the Administrators group (this, of course, requires a local shell and permissions on the Gerrit host). It was a great way to exercise what I had learned in Git from the Bottom Up [3]

[1] https://gerrit-review.googlesource.com/Documentation/config-...

[2] https://git-scm.com/book/en/v2/Git-Internals-Git-Objects

[3] https://jwiegley.github.io/git-from-the-bottom-up/



> Gerrit also stores some of its configs in a git repo.

So does gitolite where the config (repos, user's SSH keys etc) is stored completely in a git repo. Perfect for migration, backup, audits.

https://gitolite.com/gitolite/index.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: