MCPcopy Index your code
hub / github.com/git/git / calc_shared_perm

Function calc_shared_perm

path.c:739–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739int calc_shared_perm(struct repository *repo,
740 int mode)
741{
742 int tweak;
743 int shared_repo = repo_settings_get_shared_repository(repo);
744 if (shared_repo < 0)
745 tweak = -shared_repo;
746 else
747 tweak = shared_repo;
748
749 if (!(mode & S_IWUSR))
750 tweak &= ~0222;
751 if (mode & S_IXUSR)
752 /* Copy read bits to execute bits */
753 tweak |= (tweak & 0444) >> 2;
754 if (shared_repo < 0)
755 mode = (mode & ~0777) | tweak;
756 else
757 mode |= tweak;
758
759 return mode;
760}
761
762int adjust_shared_perm(struct repository *repo,
763 const char *path)

Callers 2

adjust_shared_permFunction · 0.85
reftable_be_initFunction · 0.85

Tested by

no test coverage detected