twosigma / git-meta

Repository for the git-meta project -- build your own monorepo using Git submodules
http://twosigma.github.io/git-meta
BSD 3-Clause "New" or "Revised" License
216 stars 50 forks source link

Show error when committing with -i and -a flags #794

Closed kaaniboy closed 3 years ago

kaaniboy commented 3 years ago

Issue #711 shows that running git meta commit -ia --amend --no-edit causes an unhandled error. In vanilla git, the -i (interactive) and -a (all) options are not allowed together in the first place:

▶ git commit -ia
fatal: Only one of --include/--only/--all/--interactive/--patch can be used.

This PR adds a check to the commit command's argument parsing to prevent -i and -a from being used together:

▶ gm commit -ia
The use of '-i' and '-a' does not make sense.
novalis commented 3 years ago

(this was merged but github didn't notice)