refs: move submodule code out of files-backend.c
commit5d0bc90e5de37c708f0856aef2c7b353a9d5030b
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 26 Mar 2017 02:42:31 +0000 (26 09:42 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Mar 2017 17:23:40 +0000 (27 10:23 -0700)
tree10f9023727c946102a744b3e318a405c05d6e531
parentbbbb7de7ac69e66c9263bd0e220172fe717b3f54
refs: move submodule code out of files-backend.c

files-backend is now initialized with a $GIT_DIR. Converting a submodule
path to where real submodule gitdir is located is done in get_ref_store().

This gives a slight performance improvement for submodules since we
don't convert submodule path to gitdir at every backend call like
before. We pay that once at ref-store creation.

More cleanup in files_downcast() and files_assert_main_repository()
follows shortly. It's separate to keep noises from this patch.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs/files-backend.c
refs/refs-internal.h