diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-02-07 12:03:41 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-28 13:54:11 -0800 |
| commit | 028f618658e34230e1d65678f14b6876e0f9856d (patch) | |
| tree | 696b719e0dc2e67551193239522fbfb7113d1516 /midx-write.c | |
| parent | environment: move access to "core.sharedRepository" into repo settings (diff) | |
| download | git-028f618658e34230e1d65678f14b6876e0f9856d.tar.gz git-028f618658e34230e1d65678f14b6876e0f9856d.zip | |
path: adjust last remaining users of `the_repository`
With the preceding refactorings we now only have a couple of implicit
users of `the_repository` left in the "path" subsystem, all of which
depend on global state via `calc_shared_perm()`. Make the dependency on
`the_repository` explicit by passing the repo as a parameter instead and
adjust callers accordingly.
Note that this change bubbles up into a couple of subsystems that were
previously declared as free from `the_repository`. Instead of marking
all of them as `the_repository`-dependent again, we instead use the
repository that is available in the calling context. There are three
exceptions though with "copy.c", "pack-write.c" and "tempfile.c".
Adjusting these would require us to adapt callsites all over the place,
so this is left for a future iteration.
Mark "path.c" as free from `the_repository`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx-write.c')
| -rw-r--r-- | midx-write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/midx-write.c b/midx-write.c index 61b59d557d..48d6558253 100644 --- a/midx-write.c +++ b/midx-write.c @@ -1336,7 +1336,7 @@ static int write_midx_internal(struct repository *r, const char *object_dir, return -1; } - if (adjust_shared_perm(get_tempfile_path(incr))) { + if (adjust_shared_perm(r, get_tempfile_path(incr))) { error(_("unable to adjust shared permissions for '%s'"), get_tempfile_path(incr)); return -1; |
