Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octopus-merge (part 1: tree-editing) #1566

Merged
merged 17 commits into from
Sep 5, 2024
Merged

octopus-merge (part 1: tree-editing) #1566

merged 17 commits into from
Sep 5, 2024

Commits on Sep 2, 2024

  1. Configuration menu
    Copy the full SHA
    49bca2a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    adf90cc View commit details
    Browse the repository at this point in the history
  3. fix: assure build-script is added to the package (#1572)

    Otherwise, the `GIX_VERSION` environment variable is not available at build time,
    which can lead to runtime errors.
    Byron committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    a10e7c2 View commit details
    Browse the repository at this point in the history
  4. fix!: Tree::lookup_entry() looses its buf argument.

    The buffer will now be previded from the free-list of the repository.
    Byron committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    c545d71 View commit details
    Browse the repository at this point in the history
  5. fix!: rename hash::Sha1 to hash::Hasher and Sha1Digest to `Dige…

    …st`.
    
    That way, one day we can turn this type into a compatible one which produce
    different kinds of hashes as well.
    Byron committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    cdf2a63 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ee80b2b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    71bf808 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. feat: add tree::Editor

    With it it's easy to alter existing trees or build entirely new ones,
    efficiently.
    Byron committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    14dfcf0 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    91fa478 View commit details
    Browse the repository at this point in the history
  2. fix!: Tree|TreeRef::write_to() will now assure the most basic sanit…

    …y of entry names.
    
    Previously, it would allow null-bytes in the name which would corrupt the written tree.
    Now this is forbidden.
    For some reason, it disallowed newlines, but that is now allowed as validation is should
    be handled on a higher level.
    Byron committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    a085b7e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5dc45f View commit details
    Browse the repository at this point in the history
  4. Use a standard HashMap instead of one based on SHA1

    It's faster throughout the board.
    
    ```
    ❯ cargo bench -p gix-object@0.44.0 --bench edit-tree
       Compiling gix-object v0.44.0 (/Users/byron/dev/github.com/Byron/gitoxide/gix-object)
       Compiling gix-pack v0.53.0 (/Users/byron/dev/github.com/Byron/gitoxide/gix-pack)
       Compiling gix-odb v0.63.0 (/Users/byron/dev/github.com/Byron/gitoxide/gix-odb)
        Finished `bench` profile [optimized] target(s) in 5.97s
         Running benches/edit_tree.rs (target/release/deps/edit_tree-6af6651a1c453a05)
    Gnuplot not found, using plotters backend
    editor/small tree (empty -> full -> empty)
                            time:   [2.5972 µs 2.6019 µs 2.6075 µs]
                            thrpt:  [3.8351 Melem/s 3.8434 Melem/s 3.8503 Melem/s]
                     change:
                            time:   [-32.618% -32.355% -32.038%] (p = 0.00 < 0.05)
                            thrpt:  [+47.142% +47.831% +48.409%]
                            Performance has improved.
    Found 14 outliers among 100 measurements (14.00%)
      13 (13.00%) high mild
      1 (1.00%) high severe
    editor/deeply nested tree (empty -> full -> empty)
                            time:   [8.2019 µs 8.2079 µs 8.2145 µs]
                            thrpt:  [5.5998 Melem/s 5.6043 Melem/s 5.6084 Melem/s]
                     change:
                            time:   [-33.517% -33.377% -33.246%] (p = 0.00 < 0.05)
                            thrpt:  [+49.804% +50.099% +50.415%]
                            Performance has improved.
    Found 13 outliers among 100 measurements (13.00%)
      8 (8.00%) high mild
      5 (5.00%) high severe
    
    cursor/small tree (empty -> full -> empty)
                            time:   [2.6911 µs 2.6935 µs 2.6961 µs]
                            thrpt:  [3.7090 Melem/s 3.7127 Melem/s 3.7160 Melem/s]
                     change:
                            time:   [-33.881% -33.546% -33.225%] (p = 0.00 < 0.05)
                            thrpt:  [+49.757% +50.480% +51.242%]
                            Performance has improved.
    Found 14 outliers among 100 measurements (14.00%)
      4 (4.00%) high mild
      10 (10.00%) high severe
    cursor/deeply nested tree (empty -> full -> empty)
                            time:   [1.3616 µs 1.3631 µs 1.3649 µs]
                            thrpt:  [33.703 Melem/s 33.747 Melem/s 33.783 Melem/s]
                     change:
                            time:   [-40.063% -39.675% -39.234%] (p = 0.00 < 0.05)
                            thrpt:  [+64.566% +65.769% +66.843%]
                            Performance has improved.
    Found 20 outliers among 100 measurements (20.00%)
      18 (18.00%) high mild
      2 (2.00%) high severe
    ```
    Byron committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    39d8e03 View commit details
    Browse the repository at this point in the history
  5. feat: TreeRef::to_owned() and Tree::into_owned() for a convenient…

    … way to get a fully-owned `Tree`
    Byron committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    7c48556 View commit details
    Browse the repository at this point in the history
  6. feat: add tree-editing capabilities to Tree and Repository.

    Create a tree editor using `Tree::edit()` or `Repository::edit_tree(id)`.
    Byron committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    b279957 View commit details
    Browse the repository at this point in the history
  7. feat: add InMemoryPassThrough implementation.

    An implementation of `Header`, `Write` and `Find`, that can optionally
    write everything to an in-memory store, and if enabled, also read
    objects back from there.
    
    That way it can present a consistent view to objects from two locations.
    Byron committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    ca5294a View commit details
    Browse the repository at this point in the history
  8. feat!: optionally store objects new objects in memory only.

    The default object database changed to a version that allows to
    keep objects in memory. This needs a mutable `Repository` instance
    to setup.
    Byron committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    dfbc732 View commit details
    Browse the repository at this point in the history
  9. thanks clippy

    Byron committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    b91d909 View commit details
    Browse the repository at this point in the history