jelmer / dulwich

Pure-Python Git implementation
https://www.dulwich.io/
Other
2.07k stars 402 forks source link

Git Bundle Handling #1246

Open rmspeers opened 11 months ago

rmspeers commented 11 months ago

It appears that in the bundle.py, there is at least support for the file format, and packing seems to be well supported.

I do not see a way, however, to do 2 things:

  1. git pull from a bundle. When I try to give the path as the remote, an exception propagates from down in client.py's _open_repo function.

  2. create a bundle (git bundle create) from a repo

Could anyone share ideas or tips?

rmspeers commented 10 months ago

@jelmer or anyone, do you have any suggestions? I'm not familiar with Git internals but am happy to try to add support if you have suggestions.

beninada commented 2 months ago

@rmspeers @jelmer Hello, just curious - did you happen to make any progress with bundles?

I've managed to create a bundle by generating a PackData object and adding it to a dulwich bundle that I construct manually. I can then clone from that bundle using the CLI git, but I haven't yet found an ergonomic way to clone and pull from it in python using dulwich.

jelmer commented 2 months ago

Yeah, that's currently the only way to do it. I'd be grateful for a PR if you wanted to improve the APIs around bundles