Commit Briefs
normalize tree entry modes to 0100644 or 0100755 when writing tree objects
semarie@ reported an error from go-git used by Cirrus CI: "57243613255d758e15b0f5ae1c960b970f0435f8: malformed mode (0100640)!" 'git fsck' has no problem with mode 0100640. But writing just the two most commonly used file modes should provide the best compatibility.
prevent 'got commit' on branches outside "refs/heads/"
(the only exception is the work tree's temporary histedit branch)