git.c: reorder builtin command list
The majority of commands is in alphabet order except some. Reorder them so it's easier to locate a command by eye and able to binary search. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Feb 15, 2011 at 10:09 UTC
ef5dd8a92249db22b0e30a37c7c960029c56115e
1 file changed
+9
-9
git.c
+9
-9
@@ -313,7 +313,6 @@ static void handle_internal_command(int argc, const char **argv)
313
const char *cmd = argv[0];
314
static struct cmd_struct commands[] = {
315
{ "add", cmd_add, RUN_SETUP | NEED_WORK_TREE },
316
- { "stage", cmd_add, RUN_SETUP | NEED_WORK_TREE },
316
{ "annotate", cmd_annotate, RUN_SETUP },
317
{ "apply", cmd_apply, RUN_SETUP_GENTLY },
318
{ "archive", cmd_archive },
@@ -322,15 +321,15 @@ static void handle_internal_command(int argc, const char **argv)
321
{ "branch", cmd_branch, RUN_SETUP },
322
{ "bundle", cmd_bundle, RUN_SETUP_GENTLY },
323
{ "cat-file", cmd_cat_file, RUN_SETUP },
324
+ { "check-attr", cmd_check_attr, RUN_SETUP },
325
+ { "check-ref-format", cmd_check_ref_format },
326
{ "checkout", cmd_checkout, RUN_SETUP | NEED_WORK_TREE },
327
{ "checkout-index", cmd_checkout_index,
328
RUN_SETUP | NEED_WORK_TREE},
328
- { "check-ref-format", cmd_check_ref_format },
329
- { "check-attr", cmd_check_attr, RUN_SETUP },
329
{ "cherry", cmd_cherry, RUN_SETUP },
330
{ "cherry-pick", cmd_cherry_pick, RUN_SETUP | NEED_WORK_TREE },
332
- { "clone", cmd_clone },
331
{ "clean", cmd_clean, RUN_SETUP | NEED_WORK_TREE },
332
+ { "clone", cmd_clone },
333
{ "commit", cmd_commit, RUN_SETUP | NEED_WORK_TREE },
334
{ "commit-tree", cmd_commit_tree, RUN_SETUP },
335
{ "config", cmd_config, RUN_SETUP_GENTLY },
@@ -358,8 +357,8 @@ static void handle_internal_command(int argc, const char **argv)
357
{ "init-db", cmd_init_db },
358
{ "log", cmd_log, RUN_SETUP },
359
{ "ls-files", cmd_ls_files, RUN_SETUP },
361
- { "ls-tree", cmd_ls_tree, RUN_SETUP },
360
{ "ls-remote", cmd_ls_remote, RUN_SETUP_GENTLY },
361
+ { "ls-tree", cmd_ls_tree, RUN_SETUP },
362
{ "mailinfo", cmd_mailinfo },
363
{ "mailsplit", cmd_mailsplit },
364
{ "merge", cmd_merge, RUN_SETUP | NEED_WORK_TREE },
@@ -379,6 +378,7 @@ static void handle_internal_command(int argc, const char **argv)
378
{ "notes", cmd_notes, RUN_SETUP },
379
{ "pack-objects", cmd_pack_objects, RUN_SETUP },
380
{ "pack-redundant", cmd_pack_redundant, RUN_SETUP },
381
+ { "pack-refs", cmd_pack_refs, RUN_SETUP },
382
{ "patch-id", cmd_patch_id },
383
{ "peek-remote", cmd_ls_remote, RUN_SETUP_GENTLY },
384
{ "pickaxe", cmd_blame, RUN_SETUP },
@@ -401,8 +401,10 @@ static void handle_internal_command(int argc, const char **argv)
401
{ "rm", cmd_rm, RUN_SETUP },
402
{ "send-pack", cmd_send_pack, RUN_SETUP },
403
{ "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },
404
- { "show-branch", cmd_show_branch, RUN_SETUP },
404
{ "show", cmd_show, RUN_SETUP },
405
+ { "show-branch", cmd_show_branch, RUN_SETUP },
406
+ { "show-ref", cmd_show_ref, RUN_SETUP },
407
+ { "stage", cmd_add, RUN_SETUP | NEED_WORK_TREE },
408
{ "status", cmd_status, RUN_SETUP | NEED_WORK_TREE },
409
{ "stripspace", cmd_stripspace },
410
{ "symbolic-ref", cmd_symbolic_ref, RUN_SETUP },
@@ -415,13 +417,11 @@ static void handle_internal_command(int argc, const char **argv)
417
{ "update-server-info", cmd_update_server_info, RUN_SETUP },
418
{ "upload-archive", cmd_upload_archive },
419
{ "var", cmd_var, RUN_SETUP_GENTLY },
420
+ { "verify-pack", cmd_verify_pack },
421
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
422
{ "version", cmd_version },
423
{ "whatchanged", cmd_whatchanged, RUN_SETUP },
424
{ "write-tree", cmd_write_tree, RUN_SETUP },
422
- { "verify-pack", cmd_verify_pack },
423
- { "show-ref", cmd_show_ref, RUN_SETUP },
424
- { "pack-refs", cmd_pack_refs, RUN_SETUP },
425
};
426
int i;
427
static const char ext[] = STRIP_EXTENSION;