Git fork

Merge branch 'rs/tighten-alias-help'

"git -c alias.foo=bar foo -h baz" reported "'foo' is aliased to
'bar'" and then went on to run "git foo -h baz", which was
unexpected. Tighten the rule so that alias expansion is reported
only when "-h" is the sole option.

* rs/tighten-alias-help:
git: show alias info only with lone -h

+1 -1
+1 -1
git.c
··· 371 371 alias_command = args->v[0]; 372 372 alias_string = alias_lookup(alias_command); 373 373 if (alias_string) { 374 - if (args->nr > 1 && !strcmp(args->v[1], "-h")) 374 + if (args->nr == 2 && !strcmp(args->v[1], "-h")) 375 375 fprintf_ln(stderr, _("'%s' is aliased to '%s'"), 376 376 alias_command, alias_string); 377 377 if (alias_string[0] == '!') {