diff --git a/.mise/tasks/add b/.mise/tasks/add index 0860608..18540e0 100755 --- a/.mise/tasks/add +++ b/.mise/tasks/add @@ -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)" diff --git a/test/add.bats b/test/add.bats index 54f21cb..1a297ba 100644 --- a/test/add.bats +++ b/test/add.bats @@ -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" {