In Season 4, Greg is recruited into the Army Reserve as a lawyer (Judge Advocate General branch, with sword, quill pen and wreath insignia) but in the episodes where he is shown in uniform, he wears the crossed muskets insignia of the Infantry branch.
Greg's dress uniform had captains bars on only one shoulder. He would be considered out of uniform.