googlearchive/git-rv

DISCUSSION: What should `utils.RietveldInfo.from_branch` do when called; `get` or `get_or_create`?

Opened this issue · 0 comments

From the discussion in the initial review:

It was not obvious without reading from_branch implementation that it was
a get_or_create pattern.

Maybe there is a way to make it more explicit.
s/from_branch/get_from_branch/?

When implementing it, I previously was using a get_or_create pattern and there were places where None as the return in the case it didn't exist was helpful and others
where having the new instance was helpful.

I'm still torn on which I prefer or which makes sense given the naming.

/cc @proppy @danholevoet @fredsa