@ghl-ai/aw 0.1.36-beta.103 → 0.1.36-beta.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/git.mjs +11 -3
  2. package/package.json +1 -1
package/git.mjs CHANGED
@@ -312,11 +312,19 @@ export async function fetchAndMerge(awHome, { silent = true } = {}) {
312
312
  } catch { /* local commits exist — fall through to rebase */ }
313
313
 
314
314
  if (ffSucceeded) {
315
- // Restore sparse checkout if git disabled it during the fast-forward
315
+ // Restore sparse checkout if git reset or disabled it during the fast-forward.
316
+ // git 2.46+ on blob:none repos silently drops sparse paths on ff-only when
317
+ // HEAD actually advances — sparse-checkout list still exits 0 but returns
318
+ // different (or no) paths, so we compare against the pre-merge snapshot.
316
319
  if (updated && sparsePaths.length > 0) {
320
+ let currentPaths = [];
317
321
  try {
318
- await exec(`git -C "${awHome}" sparse-checkout list`);
319
- } catch {
322
+ const { stdout: listOut } = await exec(`git -C "${awHome}" sparse-checkout list`);
323
+ currentPaths = listOut.trim().split('\n').filter(Boolean);
324
+ } catch { /* sparse checkout not active at all */ }
325
+
326
+ const needsRestore = sparsePaths.some(p => !currentPaths.includes(p));
327
+ if (needsRestore) {
320
328
  try {
321
329
  await exec(`git -C "${awHome}" sparse-checkout init --no-cone`);
322
330
  await exec(`git -C "${awHome}" sparse-checkout set ${sparsePaths.map(p => `"${p}"`).join(' ')}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.36-beta.103",
3
+ "version": "0.1.36-beta.104",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": "bin.js",