Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mise/tasks/add
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pin="$(git -C "$mod_path" rev-parse HEAD)"

manifest_set "$name" "$url" "$pin" "$track_ref"

git -C "$TARGET_DIR" add "$MANIFEST"
git -C "$TARGET_DIR" -c advice.addEmbeddedRepo=false add "$MANIFEST"

if [ -n "$track_ref" ]; then
gum style --foreground 2 "Added module '$name' ($clones_rel/$name @ ${pin:0:12}, tracking $track_ref)"
Expand Down
7 changes: 7 additions & 0 deletions test/add.bats
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ setup() {
# Readable directory should exist with repo contents
[ -d "$PARENT/modules/remote/.git" ]
[ -f "$PARENT/modules/remote/README.md" ]

# No embedded-repo warning (regression guard for #14).
# The original warning was caused by directory git add in the old
# hash-based subdirectory layout (pre-opacity redesign). That code
# path is gone, but this guard + -c flag in add task together
# prevent accidental reintroduction.
[[ "$output" != *"embedded git repository"* ]]
}

@test "add records entry in manifest" {
Expand Down
Loading