]> git.ipfire.org Git - thirdparty/git.git/commit - fast-import.c
fast-import: check most prominent commands first
authorElijah Newren <newren@gmail.com>
Wed, 20 Feb 2019 22:58:44 +0000 (14:58 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2019 02:59:08 +0000 (11:59 +0900)
commit5056bb7646cdd12d2985784f0ce4ed79550ebe63
tree606bb8b9b82c28e34644777013a8a2901450e61e
parenta63c54a019138c7aaa4624f48284722664428b15
fast-import: check most prominent commands first

This is not a very important change, and one that I expect to have no
performance impact whatsoever, but reading the code bothered me.  The
parsing of command types in cmd_main() mostly runs in order of most
common to least common commands; sure, it's hard to say for sure what
the most common are without some type of study, but it seems fairly
clear to mark the original four ("blob", "commit", "tag", "reset") as
the most prominent.  Indeed, the parsing for most other commands were
added to later in the list.  However, when "ls" was added, it was stuck
near the top of the list, with no rationale for that particular
location.  Move it down to later to appease my Tourette's-like internal
twitching that its former location was causing.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c