diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2017-03-26 09:42:32 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-14 03:53:18 -0700 |
commit | 9e7ec634a130535982e9bc63d65c2fe8c076a662 (patch) | |
tree | ba46cac1a5efa78d3c0fb809f4d3396e25830ea9 /compat/regex | |
parent | refs: move submodule code out of files-backend.c (diff) | |
download | tgif-9e7ec634a130535982e9bc63d65c2fe8c076a662.tar.xz |
files-backend: replace submodule_allowed check in files_downcast()
files-backend.c is unlearning submodules. Instead of having a specific
check for submodules to see what operation is allowed, files backend
now takes a set of flags at init. Each operation will check if the
required flags is present before performing.
For now we have four flags: read, write and odb access. Main ref store
has all flags, obviously, while submodule stores are read-only and have
access to odb (*).
The "main" flag stays because many functions in the backend calls
frontend ones without a ref store, so these functions always target the
main ref store. Ideally the flag should be gone after ref-store-aware
api is in place and used by backends.
(*) Submodule code needs for_each_ref. Try take REF_STORE_ODB flag
out. At least t3404 would fail. The "have access to odb" in submodule is
a bit hacky since we don't know from he whether add_submodule_odb() has
been called.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/regex')
0 files changed, 0 insertions, 0 deletions