Skip to content
Snippets Groups Projects
  1. Mar 07, 2024
  2. Aug 06, 2023
    • Georges Racinet's avatar
      RHGitaly: bumped MSRV to 1.65 · 2acf3e5f6f58
      Georges Racinet authored
      Rust 1.65 is currently the version generally available in GitLab
      context (upstream usage appeared recently) and it is also able
      to build tokei 12.1.2, whereas 1.61 cannot.
      
      This leads up to fix the following Clippy error (not in 1.61):
      "you are deriving `PartialEq` and can implement `Eq`".
      2acf3e5f6f58
  3. Jun 16, 2023
    • Georges Racinet's avatar
      RHGitaly: reading the GitLab default branch file · c81b8f78d8d1
      Georges Racinet authored
      As noted in comment, this should really be in the `store` subdirectory,
      but that is a fight (data migration) for another day.
      c81b8f78d8d1
    • Georges Racinet's avatar
      RHGitaly: utilities to resolve refs as Nodes · 2c80b0782b36
      Georges Racinet authored
      `gitlab::state::lookup_typed_ref_as_node` is the specialization of
      `map_lookup_typed_ref` to return `Node`s, hence it is working on a single
      stream of typed refs, whereas the higher level `gitlab::revision::full_ref_node`
      is the specialization of `map_full_ref` that works for any ref given by
      its full path.
      2c80b0782b36
  4. Jun 14, 2023
    • Georges Racinet's avatar
      RHGitaly: reading keep-arounds state file · 725e8c524ffa
      Georges Racinet authored
      This time, because there is no arbitrary name to consider, hence
      no bytes string, Tokio's `LinesStream` is perfectly suitable for
      our needs.
      725e8c524ffa
    • Georges Racinet's avatar
      RHGitaly: reading GitLab ref files · bcab70280a33
      Georges Racinet authored
      This follows the file format and conventions defined in the server side
      `heptapod` Python package.
      
      Since everything is async, we actually provide Streams of TypedRef objects,
      and the `map_lookup_typed_ref` for the numerous use cases when one is looking
      for a specific ref.
      
      The file format is very primitive, so all we can do at this point is to
      perform a full scan, but it has room (version preamble) for more advanced
      formats in the future (e.g, append-only persistent hash map or similar).
      
      A preliminary version of this was using Tokio's `LineStream`, but this
      has several drawbacks:
      
      - it is unicode-centric, yielding `String`s
      - we had to implement our own `Stream`, keeping the `LineStream` as
        a field. Hence because `poll_next()` takes `&mut Pin<Self>` we had
        to write a pinning accessor, which is unsafe (see the doc for `std::pin`
        for more details).
      bcab70280a33
Loading