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

tree -> index diff for status #1363

Merged
merged 9 commits into from
May 14, 2024
Merged

tree -> index diff for status #1363

merged 9 commits into from
May 14, 2024

Commits on May 8, 2024

  1. fix MSRV check on Windows

    turns out that Powershell is used by default there, and variable substitutions
    are different there.
    What's worse is that it doesn't seem to fail if something doesn't work as one
    would expect.
    Byron committed May 8, 2024
    Configuration menu
    Copy the full SHA
    91b6549 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Configuration menu
    Copy the full SHA
    5197b5a View commit details
    Browse the repository at this point in the history

Commits on May 11, 2024

  1. Configuration menu
    Copy the full SHA
    3448fd9 View commit details
    Browse the repository at this point in the history
  2. fix: use tempfile permissions support to set the correct mode on unix.

    Previousoly it would make an additional syscall to change permissions, which
    is slower than necessary.
    Byron committed May 11, 2024
    Configuration menu
    Copy the full SHA
    7b3dc92 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2024

  1. fix: more robustness in the face of a trampling-herd of threads loadi…

    …ng a single index.
    
    The motivating example is here: praetorian-inc/noseyparker#179
    
    Previously, it was possible for a trampling herd of threads to consolidate the
    disk state. Most of them would be 'needs-init' threads which could notice that
    the initialization already happened, and just use that.
    
    But a thread might be late for the party and somehow manages to not get any
    newly loaded index, and thus tries to consolidate with what's on disk again.
    Then it would again determine no change, and return nothing, causing the caller
    to abort and not find objects it should find because it wouldn't see the index
    that it should have seen.
    
    The reason the thread got into this mess is that the 'is-load-ongoing' flagging
    was racy itself, so it would not wait for ongoing loads and just conclude nothing
    happened. An extra delay (by yielding) now assures it either seees the loading state
    and waits for it, sees the newly loaded indices.
    
    Note that this issue can be reproduced with:
    
    ```
    './target/release/gix -r repo-with-one-pack -t10 --trace odb stats --extra-header-lookup'
    ```
    Byron committed May 12, 2024
    Configuration menu
    Copy the full SHA
    addf446 View commit details
    Browse the repository at this point in the history
  2. fix!: don't panic when unknown entry types are encountered.

    Related to helix-editor/helix#10660
    which runs into object types that are unknown.
    
    I have looked into this and [couldn't find evidence of a new pack-entry type](https://github.com/git/git/blob/0f3415f1f8478b05e64db11eb8aaa2915e48fef6/packfile.c#L1303-L1358)
    in the Git codebase.
    
    It also looks like that Git [will never write packs that aren't V2](https://github.com/git/git/blob/0f3415f1f8478b05e64db11eb8aaa2915e48fef6/pack-write.c#L352)
     - initially I thought it might write V3 based on some other criteria.
    
    For now, the thesis is that one would have to be able to mark bad objects
    to be able to handle this more gracefully, but all we can do is try to fail.
    Byron committed May 12, 2024
    Configuration menu
    Copy the full SHA
    b32a847 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. adapt to changes in gix-pack

    Byron committed May 13, 2024
    Configuration menu
    Copy the full SHA
    bad5b48 View commit details
    Browse the repository at this point in the history
  2. fix: default to creating file-symlinks if it is dangling on Windows (#…

    …1354)
    
    This behaviour is the same as in Git.
    Byron committed May 13, 2024
    Configuration menu
    Copy the full SHA
    31d02a8 View commit details
    Browse the repository at this point in the history
  3. improve the symlink probing by simplifying it

    Less IO operations, and less that can go wrong.
    Byron committed May 13, 2024
    Configuration menu
    Copy the full SHA
    7a3c583 View commit details
    Browse the repository at this point in the history