Skip to content

Commit

Permalink
git-config: don't silently ignore options after --list
Browse files Browse the repository at this point in the history
Error out if someone gives options after --list since that is
not a valid syntax.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Frank Lichtenheld authored and Shawn O. Pearce committed Oct 16, 2007
1 parent 304b5af commit a72c874
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builtin-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ int cmd_config(int argc, const char **argv, const char *prefix)
type = T_INT;
else if (!strcmp(argv[1], "--bool"))
type = T_BOOL;
else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l"))
else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l")) {
if (argc != 2)
usage(git_config_set_usage);
return git_config(show_all_config);
}
else if (!strcmp(argv[1], "--global")) {
char *home = getenv("HOME");
if (home) {
Expand Down

0 comments on commit a72c874

Please sign in to comment.