This repository was archived by the owner on Sep 3, 2025. It is now read-only.
git-bundle-server CLI Part 1: init and update#2
Merged
derrickstolee merged 3 commits intomainfrom Aug 25, 2022
Merged
Conversation
Create more helper packages in 'internal' space, including: * repo: Information about a repository including the Git dir and location of the web content. * core: Important information about the root of our filesystem data stores. * bundles: Information about working with a bundle or a list of bundles. Apply these new packages to complete the implementation of the 'init' subcommand. It now creates the 'bundle-list' file in the web directory and the 'bundle-list.json' file in the Git directory.
init and updategit-bundle-server CLI Part 1: init and update
dscho
approved these changes
Aug 25, 2022
dscho
left a comment
There was a problem hiding this comment.
This looks like a very good start to me.
Caveat: I am not regularly developing in Go, and can only cargo-cult that language. Having said that, the proposed code looks correct to me.
dscho
reviewed
Aug 25, 2022
dscho
left a comment
There was a problem hiding this comment.
Sorry, by mistake I only had reviewed the first commit before.
Be sure to parse the existing bundle headers in order to get the previous refs, then use those as prerequisites for the new incremental bundle. It's not enough to only use the refs from the previous layer, since perhaps not all refs were updated or maybe a ref was force-pushed.
735aba1 to
1b1f540
Compare
derrickstolee
added a commit
that referenced
this pull request
Sep 21, 2022
…bundle and the `update-all` subcommand Based on #2. The `update` subcommand now notices when there are more than 5 bundles and squashes the oldest ones into a new "base" bundle. The bundle is renamed but keeps the maximum creation token from that group of bundles. Modified some of the parameters, especially those in the `git` package to avoid cyclic package dependencies. Also used struct pointers more often. Repository routes are now stored in a new `routes` file (currently plaintext with line-separated list of routes). The new `update-all` subcommand runs the `update` subcommand on all registered routes. It also passes any remaining arguments down to the subcommand, which will help when we add the `--daily` and `--hourly` options.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moving along with the CLI implementation, here is the basic starting point for
initandupdate.The
initcommand does not set up the maintenance, but that will be done later.The
updatecommand creates a new tip bundle, but does not squash the oldest bundle when the bundle list grows too large.