commit: improve error message in "-a <paths>" case
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 20 Mar 2019 10:29:06 +0000 (17:29 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Mar 2019 07:44:37 +0000 (16:44 +0900)
I did something stupid today and got

$ git commit -a --fixup= @^
fatal: Paths with -a does not make sense.

which didn't make any sense (at least for the first few seconds).

Include the first path(spec) in the error message to help spot the
problem quicker. Now it shows

fatal: paths '@^ ...' with -a does not make sense

which should ring some bell because @^ should clearly not be considered
a path.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found