Add support for head, option and patch