]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/object-info-bits-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Mar 2026 01:06:52 +0000 (17:06 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Mar 2026 01:06:52 +0000 (17:06 -0800)
A couple of bugs in use of flag bits around odb API has been
corrected, and the flag bits reordered.

* ps/object-info-bits-cleanup:
  odb: convert `odb_has_object()` flags into an enum
  odb: convert object info flags into an enum
  odb: drop gaps in object info flag values
  builtin/fsck: fix flags passed to `odb_has_object()`
  builtin/backfill: fix flags passed to `odb_has_object()`

1  2 
builtin/fsck.c
object-file.c
object-file.h
odb.c
odb.h
packfile.c
packfile.h

diff --cc builtin/fsck.c
Simple merge
diff --cc object-file.c
index 8d1d8c778e5b44e472740bf7809e5f71edf1cc3a,0ab6c4d4f36d4bec232825abfd73ba308cd09f12..098b0541abf6865956961bce91456e23b7687c00
@@@ -395,11 -412,10 +395,11 @@@ static int parse_loose_header(const cha
        return 0;
  }
  
 -int odb_source_loose_read_object_info(struct odb_source *source,
 +static int read_object_info_from_path(struct odb_source *source,
 +                                    const char *path,
                                      const struct object_id *oid,
                                      struct object_info *oi,
-                                     unsigned flags)
+                                     enum object_info_flags flags)
  {
        int ret;
        int fd;
@@@ -538,16 -534,6 +538,16 @@@ out
        return ret;
  }
  
-                                     unsigned flags)
 +int odb_source_loose_read_object_info(struct odb_source *source,
 +                                    const struct object_id *oid,
 +                                    struct object_info *oi,
++                                    enum object_info_flags flags)
 +{
 +      static struct strbuf buf = STRBUF_INIT;
 +      odb_loose_path(source, &buf, oid);
 +      return read_object_info_from_path(source, buf.buf, oid, oi, flags);
 +}
 +
  static void hash_object_body(const struct git_hash_algo *algo, struct git_hash_ctx *c,
                             const void *buf, unsigned long len,
                             struct object_id *oid,
diff --cc object-file.h
Simple merge
diff --cc odb.c
Simple merge
diff --cc odb.h
Simple merge
diff --cc packfile.c
Simple merge
diff --cc packfile.h
Simple merge