From 42dcd8c7a70cedef28dff20fc1337d712e991977 Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Tue, 13 Jan 2026 16:32:26 +0000 Subject: [PATCH 01/92] Add dependabot for github actions (#74) --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..af329c2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + labels: + - 'maintenance' + groups: + actions: + patterns: + - '*' From fb86561bceb70bd46b11357d53a2b100e1dbc04a Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Tue, 13 Jan 2026 16:33:27 +0000 Subject: [PATCH 02/92] Deploy WebAssembly cockle and terminal builds to github pages (#75) --- .github/workflows/deploy-wasm.yml | 54 +++++++++++++++++++++++++++++++ .nojekyll | 0 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/deploy-wasm.yml create mode 100644 .nojekyll diff --git a/.github/workflows/deploy-wasm.yml b/.github/workflows/deploy-wasm.yml new file mode 100644 index 0000000..07b93cb --- /dev/null +++ b/.github/workflows/deploy-wasm.yml @@ -0,0 +1,54 @@ +# Deploy WebAssembly cockle and terminal builds to github pages +name: Deploy wasm to github pages + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.14' + + - name: Install mamba + uses: mamba-org/setup-micromamba@v2 + with: + environment-file: wasm/wasm-environment.yml + cache-environment: true + + - name: Build the cockle and JupyterLite terminal deployments + shell: bash -l {0} + working-directory: wasm + run: | + cmake . + make + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./wasm/serve + + deploy: + needs: build + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 From 9c8b0523b059054d8dded495ec4e1e431aca56f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 17:35:05 +0100 Subject: [PATCH 03/92] Bump actions/checkout from 4 to 6 in the actions group (#76) Bumps the actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8fe0ce6..6bd1a6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 From 6ed293a9462b22b2826af09a32a7ca778ca943e8 Mon Sep 17 00:00:00 2001 From: Sandrine Pataut Date: Wed, 14 Jan 2026 14:27:52 +0100 Subject: [PATCH 04/92] Add --deepen flag to the fetch command (#71) * Add --deepen flag to the fetch command * Fixed get_parent_list * More fixes * Code cleanup * Fixed depth=1 * Fixed depth=0 --------- Co-authored-by: Johan Mabille --- src/subcommand/clone_subcommand.cpp | 16 +++++- src/subcommand/clone_subcommand.hpp | 3 +- src/subcommand/fetch_subcommand.cpp | 7 ++- src/subcommand/fetch_subcommand.hpp | 2 +- src/wrapper/commit_wrapper.cpp | 15 +++++ src/wrapper/commit_wrapper.hpp | 8 ++- src/wrapper/repository_wrapper.cpp | 85 +++++++++++++++++++++++++++++ src/wrapper/repository_wrapper.hpp | 4 ++ test/test_remote.py | 31 ++++++++++- 9 files changed, 162 insertions(+), 9 deletions(-) diff --git a/src/subcommand/clone_subcommand.cpp b/src/subcommand/clone_subcommand.cpp index d660ae1..acc6f14 100644 --- a/src/subcommand/clone_subcommand.cpp +++ b/src/subcommand/clone_subcommand.cpp @@ -21,6 +21,20 @@ clone_subcommand::clone_subcommand(const libgit2_object&, CLI::App& app) void clone_subcommand::run() { + // m_depth = 0 means no shallow clone in libgit2, while + // it is forbidden with git. Therefore we use another + // sentinel value to detect full clone. + if (m_depth == 0) + { + std::cout << "fatal: depth 0 is not a positive number" << std::endl; + return; + } + + if (m_depth == std::numeric_limits::max()) + { + m_depth = 0; + } + git_indexer_progress pd; git_clone_options clone_opts = GIT_CLONE_OPTIONS_INIT; git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT; @@ -34,8 +48,6 @@ void clone_subcommand::run() clone_opts.fetch_opts.depth = m_depth; clone_opts.bare = m_bare ? 1 : 0; - - std::string short_name = m_directory; if (m_directory.empty()) { diff --git a/src/subcommand/clone_subcommand.hpp b/src/subcommand/clone_subcommand.hpp index 76e6074..ab61461 100644 --- a/src/subcommand/clone_subcommand.hpp +++ b/src/subcommand/clone_subcommand.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #include "../utils/common.hpp" @@ -16,7 +17,7 @@ class clone_subcommand std::string m_repository = {}; std::string m_directory = {}; bool m_bare = false; - size_t m_depth = 0; + size_t m_depth = std::numeric_limits::max(); // std::string m_shallow_since; // std::vector m_shallow_exclude; }; diff --git a/src/subcommand/fetch_subcommand.cpp b/src/subcommand/fetch_subcommand.cpp index b5e26c6..0662970 100644 --- a/src/subcommand/fetch_subcommand.cpp +++ b/src/subcommand/fetch_subcommand.cpp @@ -14,7 +14,7 @@ fetch_subcommand::fetch_subcommand(const libgit2_object&, CLI::App& app) sub->add_option("", m_remote_name, "The remote to fetch from") ->default_val("origin"); sub->add_option("--depth", m_depth, "deepen or shorten history of shallow clone"); - // sub->add_option("--deepen", m_deepen, "deepen history of shallow clone"); + sub->add_option("--deepen", m_deepen, "deepen history of shallow clone"); // sub->add_option("--shallow-since", m_shallow_since, "