aboutsummaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-03-26 09:42:17 +0700
committerJunio C Hamano <gitster@pobox.com>2017-03-27 10:23:39 -0700
commit1eab194bf06786a987497d7bc8ffcf5c0dae0e36 (patch)
treebfd1a61a3d88ed18b9967cdb7f4ff9f416d31591 /http-push.c
parent4f43731268a85a095e6a0779fc94242f4694e0f4 (diff)
downloadgit-1eab194bf06786a987497d7bc8ffcf5c0dae0e36.tar.gz
git-1eab194bf06786a987497d7bc8ffcf5c0dae0e36.tar.xz
files-backend: delete dead code in files_init_db()
safe_create_dir() can do adjust_shared_perm() internally, and init-db has always created 'refs' in shared mode since the beginning, af6e277c5e (git-init-db: initialize shared repositories with --shared - 2005-12-22). So this code looks like extra adjust_shared_perm calls are unnecessary. And they are. But let's see why there are here in the first place. This code was added in 6fb5acfd8f (refs: add methods to init refs db - 2016-09-04). From the diff alone this looks like a faithful refactored code from init-db.c. But there is a subtle difference: Between the safe_create_dir() block and adjust_shared_perm() block in the old init-db.c, we may copy/recreate directories from the repo template. So it makes sense that adjust_shared_perm() is re-executed then to fix potential permission screwups. After 6fb5acfd8f, refs dirs are created after template is copied. Nobody will change directory permission again. So the extra adjust_shared_perm() is redudant. Delete them. 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 'http-push.c')
0 files changed, 0 insertions, 0 deletions