diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-07-17 06:56:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-07-16 22:16:17 -0700 |
commit | 0df005353aca4e490478a4e8c2d090728599868e (patch) | |
tree | 25e7352de22a170fa7aabdc27130fbd227517df2 /git-gui/lib/commit.tcl | |
parent | d81712ce65f7ee59ce88c8b74f09b6e6456a6f3c (diff) |
object-file: get rid of `the_repository` in `read_loose_object()`
The function `read_loose_object()` takes a path to an object file and
tries to parse it. As such, the function does not depend on any specific
object database but instead acts as an ODB-independent way to read a
specific file. As such, all it needs as input is a repository so that we
can derive repo settings and the hash algorithm.
That repository isn't passed in as a parameter though, as we implicitly
depend on the global `the_repository`. Refactor the function so that we
pass in the repository as a parameter.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/commit.tcl')
0 files changed, 0 insertions, 0 deletions