diff options
| author | Taylor Blau <me@ttaylorr.com> | 2024-10-18 13:56:22 -0400 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2024-10-18 13:56:22 -0400 |
| commit | b9678514172ea6234f747fbe0b18376dd02463cb (patch) | |
| tree | d3d7b2670e8b7fd66ebd944b4723352cc7fbb977 | |
| parent | Merge branch 'jc/doc-refspec-syntax' (diff) | |
| parent | loose: don't rely on repository global state (diff) | |
| download | git-b9678514172ea6234f747fbe0b18376dd02463cb.tar.gz git-b9678514172ea6234f747fbe0b18376dd02463cb.zip | |
Merge branch 'kn/loose-object-layer-wo-global-hash'
Code clean-up.
* kn/loose-object-layer-wo-global-hash:
loose: don't rely on repository global state
| -rw-r--r-- | loose.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,10 +1,9 @@ -#define USE_THE_REPOSITORY_VARIABLE - #include "git-compat-util.h" #include "hash.h" #include "path.h" #include "object-store.h" #include "hex.h" +#include "repository.h" #include "wrapper.h" #include "gettext.h" #include "loose.h" @@ -142,8 +141,8 @@ int repo_write_loose_object_map(struct repository *repo) for (; iter != kh_end(map); iter++) { if (kh_exist(map, iter)) { - if (oideq(&kh_key(map, iter), the_hash_algo->empty_tree) || - oideq(&kh_key(map, iter), the_hash_algo->empty_blob)) + if (oideq(&kh_key(map, iter), repo->hash_algo->empty_tree) || + oideq(&kh_key(map, iter), repo->hash_algo->empty_blob)) continue; strbuf_addf(&buf, "%s %s\n", oid_to_hex(&kh_key(map, iter)), oid_to_hex(kh_value(map, iter))); if (write_in_full(fd, buf.buf, buf.len) < 0) |
