mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
c85fe51f5f
Summary: There seem to be legitimate cases when we want to have both bypass mechanisms available: via the commit message and via the pushvar. The need to be able to use a commit message arises from the fact that engineers rarely have access to push CLI, so they cannot use pushvars. Still, pushvars are useful if we want to push an existing commit without any changes to its message. NB. Since I wanted to make `HookBypass` a multi-option, I had to change it from `enum` to `struct`. If I left fields `pub` in that struct (the way it's commonly done in `metaconfig`, I would've allowed `HookBypass` instances with both options `None`. This is not a big deal, but is a bit ugly as we already store `Option<HookBypass>` instead, so it's better if `Some(hook_bypass)` symbolizes that there indeed is some way to bypass the hook. So I opted in for constructors, getters and private fields. Reviewed By: StanislavGlebik Differential Revision: D25000578 fbshipit-source-id: ad13076c9690ee8d45fc4a93e32a6026ff5bdd09 |
||
---|---|---|
.. | ||
parser | ||
types |