Re: [PATCH 3/7] builtin.h: ASCII-sort list of functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Denton Liu <liu.denton@xxxxxxxxx> writes:

> ASCII sorting was chosen over strict alphabetical order for the same
> reason as 805d9eaf5e (Makefile: ASCII-sort += lists, 2020-03-21): the
> purpose of maintaining the sorted list is to ensure line insertions are
> deterministic. By using ASCII ordering, it is more easily mechanically
> reproducible in the future, such as by using :sort in Vim.

This happens to work only because '(' sorts way earlier than '_'.
Otherwise we'd probably be sorting with 'sort -t\( -k1' or something
like that.

I do not know if it worth mentioning, because it is unlikely that
the sort order between '(' and '_' would ever change ;-).

> This patch is best viewed with `--color-moved`.
>
> Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
> ---
>  builtin.h | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/builtin.h b/builtin.h
> index b6ce981b73..dd6beff6b2 100644
> --- a/builtin.h
> +++ b/builtin.h
> @@ -122,16 +122,16 @@ int cmd_branch(int argc, const char **argv, const char *prefix);
>  int cmd_bugreport(int argc, const char **argv, const char *prefix);
>  int cmd_bundle(int argc, const char **argv, const char *prefix);
>  int cmd_cat_file(int argc, const char **argv, const char *prefix);
> -int cmd_checkout(int argc, const char **argv, const char *prefix);
> -int cmd_checkout_index(int argc, const char **argv, const char *prefix);
>  int cmd_check_attr(int argc, const char **argv, const char *prefix);
>  int cmd_check_ignore(int argc, const char **argv, const char *prefix);
>  int cmd_check_mailmap(int argc, const char **argv, const char *prefix);
>  int cmd_check_ref_format(int argc, const char **argv, const char *prefix);
> +int cmd_checkout(int argc, const char **argv, const char *prefix);
> +int cmd_checkout_index(int argc, const char **argv, const char *prefix);
>  int cmd_cherry(int argc, const char **argv, const char *prefix);
>  int cmd_cherry_pick(int argc, const char **argv, const char *prefix);
> -int cmd_clone(int argc, const char **argv, const char *prefix);
>  int cmd_clean(int argc, const char **argv, const char *prefix);
> +int cmd_clone(int argc, const char **argv, const char *prefix);
>  int cmd_column(int argc, const char **argv, const char *prefix);
>  int cmd_commit(int argc, const char **argv, const char *prefix);
>  int cmd_commit_graph(int argc, const char **argv, const char *prefix);
> @@ -143,9 +143,9 @@ int cmd_credential_cache(int argc, const char **argv, const char *prefix);
>  int cmd_credential_cache_daemon(int argc, const char **argv, const char *prefix);
>  int cmd_credential_store(int argc, const char **argv, const char *prefix);
>  int cmd_describe(int argc, const char **argv, const char *prefix);
> +int cmd_diff(int argc, const char **argv, const char *prefix);
>  int cmd_diff_files(int argc, const char **argv, const char *prefix);
>  int cmd_diff_index(int argc, const char **argv, const char *prefix);
> -int cmd_diff(int argc, const char **argv, const char *prefix);
>  int cmd_diff_tree(int argc, const char **argv, const char *prefix);
>  int cmd_difftool(int argc, const char **argv, const char *prefix);
>  int cmd_env__helper(int argc, const char **argv, const char *prefix);
> @@ -169,16 +169,16 @@ int cmd_interpret_trailers(int argc, const char **argv, const char *prefix);
>  int cmd_log(int argc, const char **argv, const char *prefix);
>  int cmd_log_reflog(int argc, const char **argv, const char *prefix);
>  int cmd_ls_files(int argc, const char **argv, const char *prefix);
> -int cmd_ls_tree(int argc, const char **argv, const char *prefix);
>  int cmd_ls_remote(int argc, const char **argv, const char *prefix);
> +int cmd_ls_tree(int argc, const char **argv, const char *prefix);
>  int cmd_mailinfo(int argc, const char **argv, const char *prefix);
>  int cmd_mailsplit(int argc, const char **argv, const char *prefix);
>  int cmd_maintenance(int argc, const char **argv, const char *prefix);
>  int cmd_merge(int argc, const char **argv, const char *prefix);
>  int cmd_merge_base(int argc, const char **argv, const char *prefix);
> +int cmd_merge_file(int argc, const char **argv, const char *prefix);
>  int cmd_merge_index(int argc, const char **argv, const char *prefix);
>  int cmd_merge_ours(int argc, const char **argv, const char *prefix);
> -int cmd_merge_file(int argc, const char **argv, const char *prefix);
>  int cmd_merge_recursive(int argc, const char **argv, const char *prefix);
>  int cmd_merge_tree(int argc, const char **argv, const char *prefix);
>  int cmd_mktag(int argc, const char **argv, const char *prefix);
> @@ -189,6 +189,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix);
>  int cmd_notes(int argc, const char **argv, const char *prefix);
>  int cmd_pack_objects(int argc, const char **argv, const char *prefix);
>  int cmd_pack_redundant(int argc, const char **argv, const char *prefix);
> +int cmd_pack_refs(int argc, const char **argv, const char *prefix);
>  int cmd_patch_id(int argc, const char **argv, const char *prefix);
>  int cmd_prune(int argc, const char **argv, const char *prefix);
>  int cmd_prune_packed(int argc, const char **argv, const char *prefix);
> @@ -204,6 +205,7 @@ int cmd_remote(int argc, const char **argv, const char *prefix);
>  int cmd_remote_ext(int argc, const char **argv, const char *prefix);
>  int cmd_remote_fd(int argc, const char **argv, const char *prefix);
>  int cmd_repack(int argc, const char **argv, const char *prefix);
> +int cmd_replace(int argc, const char **argv, const char *prefix);
>  int cmd_rerere(int argc, const char **argv, const char *prefix);
>  int cmd_reset(int argc, const char **argv, const char *prefix);
>  int cmd_restore(int argc, const char **argv, const char *prefix);
> @@ -216,9 +218,10 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix);
>  int cmd_show(int argc, const char **argv, const char *prefix);
>  int cmd_show_branch(int argc, const char **argv, const char *prefix);
>  int cmd_show_index(int argc, const char **argv, const char *prefix);
> +int cmd_show_ref(int argc, const char **argv, const char *prefix);
>  int cmd_sparse_checkout(int argc, const char **argv, const char *prefix);
> -int cmd_status(int argc, const char **argv, const char *prefix);
>  int cmd_stash(int argc, const char **argv, const char *prefix);
> +int cmd_status(int argc, const char **argv, const char *prefix);
>  int cmd_stripspace(int argc, const char **argv, const char *prefix);
>  int cmd_submodule__helper(int argc, const char **argv, const char *prefix);
>  int cmd_switch(int argc, const char **argv, const char *prefix);
> @@ -235,14 +238,11 @@ int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix);
>  int cmd_upload_pack(int argc, const char **argv, const char *prefix);
>  int cmd_var(int argc, const char **argv, const char *prefix);
>  int cmd_verify_commit(int argc, const char **argv, const char *prefix);
> +int cmd_verify_pack(int argc, const char **argv, const char *prefix);
>  int cmd_verify_tag(int argc, const char **argv, const char *prefix);
>  int cmd_version(int argc, const char **argv, const char *prefix);
>  int cmd_whatchanged(int argc, const char **argv, const char *prefix);
>  int cmd_worktree(int argc, const char **argv, const char *prefix);
>  int cmd_write_tree(int argc, const char **argv, const char *prefix);
> -int cmd_verify_pack(int argc, const char **argv, const char *prefix);
> -int cmd_show_ref(int argc, const char **argv, const char *prefix);
> -int cmd_pack_refs(int argc, const char **argv, const char *prefix);
> -int cmd_replace(int argc, const char **argv, const char *prefix);
>  
>  #endif



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux