]> git.ipfire.org Git - thirdparty/git.git/commit
reset: reorder wildcard pathspec conditions
authorVictoria Dye <vdye@github.com>
Tue, 11 Jan 2022 18:04:59 +0000 (18:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jan 2022 21:49:44 +0000 (13:49 -0800)
commit1624333ec1486378c44ce38e4f8ae9d02c07d15a
tree1c7fd4f92c99a74cb92b2148f2777f05b20522d3
parentbb01b26dec69f5f287f0d36cbe4c765fe7f7b053
reset: reorder wildcard pathspec conditions

Rearrange conditions in method determining whether index expansion is
necessary when a pathspec is specified for `git reset`, placing less
expensive condition first. Additionally, add details & examples to related
code comments to help with readability.

Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Victoria Dye <vdye@github.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reset.c