am: handle "-h" argument earlier
[gitweb.git] / builtin / am.c
index a95dd8b4e6c793d9e51658e2ccbe535cf5a5af45..c74df14722fb182dc9f50165d66484462c5f18a6 100644 (file)
@@ -2319,6 +2319,9 @@ int cmd_am(int argc, const char **argv, const char *prefix)
                OPT_END()
        };
 
+       if (argc == 2 && !strcmp(argv[1], "-h"))
+               usage_with_options(usage, options);
+
        git_config(git_am_config, NULL);
 
        am_state_init(&state);