]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: suppress checking for file name and ref ambiguity for object ids
authorOrgad Shaneh <orgads@gmail.com>
Sun, 6 Sep 2020 20:53:55 +0000 (20:53 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 6 Sep 2020 21:44:41 +0000 (14:44 -0700)
commita462bee5d5b52c9778a9df600494fbd87f3c5fb9
treebacb0cdb65f0489615d1cba1a47b9fad244ec4ff
parent3a238e539bcdfe3f9eb5010fd218640c1b499f7a
submodule: suppress checking for file name and ref ambiguity for object ids

The argv argument of collect_changed_submodules() contains only object ids
(the objects references of all the refs).

Notify setup_revisions() that the input is not filenames by passing
assume_dashdash, so it can avoid redundant stat for each ref.

Also suppress refname_ambiguity flag to avoid filesystem lookups for
each object. Similar logic can be found in cat-file, pack-objects and more.

This change reduces the time for git fetch in my repo from 25s to 6s.

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c