Skip to content

Make packbuilder interruptible using progress callback#6874

Merged
ethomson merged 1 commit into
libgit2:mainfrom
roberth:packbuilder-interruptible
Sep 25, 2024
Merged

Make packbuilder interruptible using progress callback#6874
ethomson merged 1 commit into
libgit2:mainfrom
roberth:packbuilder-interruptible

Conversation

@roberth
Copy link
Copy Markdown
Contributor

@roberth roberth commented Sep 2, 2024

Specifically, forward errors from packbuilder->progress_cb

This allows the callback to gracefully terminate long-running operations when the application is interrupted.

Interruption could be ^C in the terminal, but this could be any other condition or event, as this is up to the callback function to implement.

My specific motivation for this is to improve the responsiveness of the Nix package manager to interrupts in the terminal, in the context of NixOS/nix#11330, which proposes to write packfiles instead of loose objects for performance.

Specifically, forward errors from packbuilder->progress_cb

This allows the callback to gracefully terminate long-running
operations when the application is interrupted.

Interruption could be ^C in the terminal, but this could be any
other condition or event, as this is up to the callback function
to implement.
@ethomson
Copy link
Copy Markdown
Member

Helpful fix, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants