Refactor to avoid respond_to? conditional
A hook is added to `container`s of Repository which is called if `change_head` is attempted but the specified branch does not exist. This is just to support the previously existing behavior for `Project`, in which a validation error is added. Technically this change removes the validation error from Snippet, but that was never a defined or necessarily desired behavior before. If someone wishes to add that in the future, it will be easy; they just need to use the hook in Snippet.
Showing
Please register or sign in to comment