The infinitive form of verbs in English always starts with "to", as in "to add", "to fix" etc. That would be a very strange commit message. Imperative is normal: "Add x feature" etc
This is not correct; many infinitives are marked by "to" and many aren't. Such marking may, depending on context, be required, optional, or prohibited. For example, in "this can be a hassle", "be" is an infinitive. There just isn't any way to interpret it as an imperative. Who are you commanding?
And in the commit message "Add feature X", "add" is likewise an infinitive.
Eh? "To be" is not the main verb in that sentence so of course it's in infinitive form. "Add feature X" is imperative. "To add feature X" is infinitive.
> "To be" is not the main verb in that sentence ["this can be a hassle"] so of course it's in infinitive form.
This directly conflicts with your earlier statement that
> The infinitive form of verbs in English always starts with "to", as in "to add", "to fix" etc.
That earlier statement is wrong, so contradicting it doesn't really present a problem, but you've left me pretty confused as to what you think you're saying.
Whether "be" is the "main verb" in that sentence is a more interesting question. There's a decent argument that it is, in that "this can be a hassle" is easily viewed as a modified form of the sentence "this is a hassle", but not as a modified form of the defective sentence "this can". But you're correct that the standard analysis just says that "this can be a hassle" is sentence where the subject is "this", the verb is "can", and the object is an infinitive clause.