jettypod 4.4.92 ā 4.4.94
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.
|
@@ -244,6 +244,23 @@ Why: Hooks check CWD before 'cd &&' executes, so chained commands fail.`
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
// BLOCKED: git stash in worktrees
|
|
248
|
+
// Stashing bypasses the uncommitted changes check and leads to lost work
|
|
249
|
+
if (/git\s+stash\b/.test(strippedCommand)) {
|
|
250
|
+
const isInWorktree = cwd && cwd.includes('.jettypod-work');
|
|
251
|
+
if (isInWorktree) {
|
|
252
|
+
return {
|
|
253
|
+
allowed: false,
|
|
254
|
+
message: 'git stash is blocked in worktrees',
|
|
255
|
+
hint: `Stashing hides uncommitted work and bypasses safety checks.
|
|
256
|
+
|
|
257
|
+
Instead, commit your work:
|
|
258
|
+
git add -A && git commit -m "your message"
|
|
259
|
+
|
|
260
|
+
Then merge normally. Your work will be preserved.`
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
}
|
|
247
264
|
|
|
248
265
|
// ALLOWED: Git read-only commands
|
|
249
266
|
if (/git\s+(status|log|diff|show|branch\s*$|remote|fetch)\b/.test(strippedCommand)) {
|
package/lib/git-hooks/pre-commit
CHANGED
|
@@ -67,7 +67,7 @@ async function exportSnapshots() {
|
|
|
67
67
|
console.log('\nšø Exporting database snapshots...\n');
|
|
68
68
|
|
|
69
69
|
try {
|
|
70
|
-
const { exportAll } = require('
|
|
70
|
+
const { exportAll } = require('__JETTYPOD_ROOT__/lib/db-export');
|
|
71
71
|
const paths = await exportAll();
|
|
72
72
|
|
|
73
73
|
// Stage the snapshot files
|