Repository navigation
just vm: fetch nix-config's full history when the submodule is shallow - #104
Merged
Merged
Conversation
`.gitmodules` checks nix-config out shallow, and nix refuses a shallow git
checkout as a flake ("'revCount' is not available"), so `just vm` failed
even after #103 lifted the sparse checkout. `_nix-config-full` now runs
`git -C nix-config fetch --unshallow` when the submodule is shallow; the
next run sees a full clone and does nothing. nix-config#78 makes its own
recipes accept a shallow checkout too, but that only reaches here with a
pin bump.
Tested: in a scratch superproject with nix-config added as a --depth 1 submodule from GitHub, `just _nix-config-full` unshallowed it (is-shallow-repository false), a second run printed nothing, and `nix eval .#nixosConfigurations.nixos.config.system.build.vm.name` gave nixos-vm; `just --list` parses
Cost: none
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxFd8xekxhf5MDQNB7tdQz
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary Before:
just vmfailed with "'/…/ww3-gpu/nix-config' is a shallow Git repository, so 'revCount' is not available", because.gitmoduleschecks nix-config out shallow and nix refuses a shallow git checkout as a flake. After:_nix-config-fullrunsgit -C nix-config fetch --unshallowonce when the submodule is shallow, andjust vmbuilds.--depth 1submodule from GitHub:just _nix-config-fullunshallowed it, a second run printed nothing,nix eval .#nixosConfigurations.nixos.config.system.build.vm.namegavenixos-vm;just --listparsesWhat changed
justfile:_nix-config-fullunshallows nix-config (local state only, like the sparse-checkout line above it). fix(vm):just vmandjust graphifywork from a shallow checkout picasso#78 makes nix-config's own recipes accept a shallow checkout; that reaches here only with a pin bump.🤖 Generated with Claude Code
https://claude.ai/code/session_01KxFd8xekxhf5MDQNB7tdQz
Generated by Claude Code