Summary
Libra cannot construct or operate on Git's skip-worktree sparse-index state used by upstream t/t3705-add-sparse-checkout.sh test 13. In particular, update-index --force-remove and update-index --skip-worktree are rejected, and sparse-checkout is not implemented. As a result, the target command add --dry-run --ignore-missing sparse_entry is never reached in the upstream-compatible scenario.
This is tracked by libra-testcases as TC-0010 (git add --dry-run --ignore-missing warn on sparse path).
Versions
- Libra:
0.22.19
- Git control:
2.55.0.782.g1630431f32
- Platform: macOS/Darwin, case-insensitive APFS
- Upstream source: Git commit
1630431f326e15fcde608827b5ff38422528eb59, t/t3705-add-sparse-checkout.sh lines 10-25 and 140-147
Reproduction
set -eu
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
"$LIBRA" init -q --initial-branch=main "$work/repo"
cd "$work/repo"
"$LIBRA" update-index --force-remove sparse_entry
printf 'sparse\n' >sparse_entry
"$LIBRA" add sparse_entry
"$LIBRA" update-index --skip-worktree sparse_entry
Actual behavior
$ libra update-index --force-remove sparse_entry
error: unexpected argument '--force-remove' found
Error-Code: LBR-CLI-002
exit=129
$ libra update-index --skip-worktree sparse_entry
error: unexpected argument '--skip-worktree' found
Error-Code: LBR-CLI-002
exit=129
$ libra sparse-checkout init --no-cone
libra: 'sparse-checkout' is not a libra command. See 'libra --help'.
Error-Code: LBR-CLI-001
exit=129
The original full test run stops at update-index --force-remove sparse_entry; it never executes add --dry-run --ignore-missing sparse_entry.
Expected behavior
Git supports the setup:
git update-index --force-remove sparse_entry # exit 0
git add sparse_entry # exit 0
git update-index --skip-worktree sparse_entry # exit 0
git config core.sparseCheckout false # exit 0
git commit --allow-empty -m 'ensure sparse_entry exists at HEAD'
After removing the working-tree path, Git runs:
git add --dry-run --ignore-missing sparse_entry
The command exits with a regular non-zero status, leaves the skip-worktree index entry unchanged and unstaged, and reports that the path is outside the sparse-checkout definition with --sparse/sparsity-rule advice.
Acceptance criteria
- Support
update-index --force-remove and update-index --skip-worktree for the sparse-entry setup, or provide Git-compatible behavior through the mapped CLI surface.
- Support the sparse-checkout behavior required for a skip-worktree entry, including the
core.sparseCheckout=false scenario used above.
- For
add --dry-run --ignore-missing on a missing skip-worktree path, return a regular non-zero status, preserve the index entry and staged diff state, and emit a diagnostic identifying the sparse path and remediation.
- Product-specific error-code, hint, or JSON formatting is acceptable, but the target command must actually be reached in the upstream scenario.
Test tracking
cases/tc0010-add-dry-run-sparse-path/tc0010-add-dry-run-sparse-path.sh
libra-git-testcases-spec.md TC-0010
results/libra-0.22.19/notes.md TC-0010
libra-git-testcases-review.md TC-0010
Summary
Libra cannot construct or operate on Git's skip-worktree sparse-index state used by upstream
t/t3705-add-sparse-checkout.shtest 13. In particular,update-index --force-removeandupdate-index --skip-worktreeare rejected, andsparse-checkoutis not implemented. As a result, the target commandadd --dry-run --ignore-missing sparse_entryis never reached in the upstream-compatible scenario.This is tracked by libra-testcases as TC-0010 (
git add --dry-run --ignore-missing warn on sparse path).Versions
0.22.192.55.0.782.g1630431f321630431f326e15fcde608827b5ff38422528eb59,t/t3705-add-sparse-checkout.shlines 10-25 and 140-147Reproduction
Actual behavior
The original full test run stops at
update-index --force-remove sparse_entry; it never executesadd --dry-run --ignore-missing sparse_entry.Expected behavior
Git supports the setup:
After removing the working-tree path, Git runs:
The command exits with a regular non-zero status, leaves the skip-worktree index entry unchanged and unstaged, and reports that the path is outside the sparse-checkout definition with
--sparse/sparsity-rule advice.Acceptance criteria
update-index --force-removeandupdate-index --skip-worktreefor the sparse-entry setup, or provide Git-compatible behavior through the mapped CLI surface.core.sparseCheckout=falsescenario used above.add --dry-run --ignore-missingon a missing skip-worktree path, return a regular non-zero status, preserve the index entry and staged diff state, and emit a diagnostic identifying the sparse path and remediation.Test tracking
cases/tc0010-add-dry-run-sparse-path/tc0010-add-dry-run-sparse-path.shlibra-git-testcases-spec.mdTC-0010results/libra-0.22.19/notes.mdTC-0010libra-git-testcases-review.mdTC-0010