@johngaynor/ocnus 2.0.1-next.69 → 2.0.1-next.71
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.
- package/cli/lib/finish.sh +30 -4
- package/herdr/README.md +6 -0
- package/package.json +1 -1
package/cli/lib/finish.sh
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
# - commits on the branch that are not in the remote's default branch, even
|
|
12
12
|
# pushed ones, such as a fix pushed after the pull request merged;
|
|
13
13
|
# - ignored files that the repo's setup does not make again (setup_makes,
|
|
14
|
-
# in recipes.sh), which `git worktree remove` deletes without a word
|
|
14
|
+
# in recipes.sh), which `git worktree remove` deletes without a word,
|
|
15
|
+
# other than what gpui-shell writes into a mod's folder (gpui_shells);
|
|
15
16
|
# - anything in the task folder outside its worktrees.
|
|
16
17
|
# scripts/after-merge makes the same checks for Claude Code's own worktrees.
|
|
17
18
|
# A task that would lose work is still removed by hand.
|
|
@@ -19,6 +20,28 @@
|
|
|
19
20
|
# Lines on stdin, indented under a heading: at most 20, then how many more.
|
|
20
21
|
listed() { awk 'NR <= 20 { print " " $0 } END { if (NR > 20) print " and " NR - 20 " more" }'; }
|
|
21
22
|
|
|
23
|
+
# Print the lines on stdin, paths in the worktree $1, that are not what
|
|
24
|
+
# gpui-shell wrote. gpui-shell, which runs Herdr's mods, writes two files into
|
|
25
|
+
# the folder of each mod it runs, in any repo and whatever its setup says:
|
|
26
|
+
# gpui-kit.d.ts, which it rewrites on every run, and jsconfig.json, which it
|
|
27
|
+
# writes once, when there is none, and which is then the user's. So any
|
|
28
|
+
# gpui-kit.d.ts goes, but a jsconfig.json goes only while it is still
|
|
29
|
+
# gpui-shell's: it says it was written by gpui-shell, and a gpui-kit.d.ts is
|
|
30
|
+
# beside it. A jsconfig.json of the repo's own is still work.
|
|
31
|
+
gpui_shells() {
|
|
32
|
+
local wt=$1 f
|
|
33
|
+
while IFS= read -r f; do
|
|
34
|
+
case /$f in
|
|
35
|
+
*/gpui-kit.d.ts) continue ;;
|
|
36
|
+
*/jsconfig.json)
|
|
37
|
+
[ -f "$wt/${f%jsconfig.json}gpui-kit.d.ts" ] &&
|
|
38
|
+
grep -qF 'Written once by gpui-shell' "$wt/$f" 2>/dev/null && continue
|
|
39
|
+
;;
|
|
40
|
+
esac
|
|
41
|
+
printf '%s\n' "$f"
|
|
42
|
+
done
|
|
43
|
+
}
|
|
44
|
+
|
|
22
45
|
# Print the folder of a card's task, or stop when it has none on this
|
|
23
46
|
# machine: tasks/<card>-<short name>, or tasks/<card> for a title with no
|
|
24
47
|
# plain words, as `task build` finds it. Linear is not asked.
|
|
@@ -118,8 +141,10 @@ check_worktree() {
|
|
|
118
141
|
fi
|
|
119
142
|
|
|
120
143
|
# Ignored files, file by file: each counts as work unless it is, or is in,
|
|
121
|
-
# something the patterns that setup_makes prints match
|
|
122
|
-
#
|
|
144
|
+
# something the patterns that setup_makes prints match, or is what
|
|
145
|
+
# gpui-shell wrote (gpui_shells). git quotes an odd name the same way in
|
|
146
|
+
# both lists, so they can be compared line by line; a quoted name is never
|
|
147
|
+
# taken for gpui-shell's, so it counts as work.
|
|
123
148
|
if ! git -C "$wt" ls-files --others --ignored --exclude-standard > "$scratch/ignored" 2>/dev/null; then
|
|
124
149
|
add_problem " git could not list its ignored files, so what removing it would lose is not known"
|
|
125
150
|
elif [ -s "$scratch/ignored" ]; then
|
|
@@ -130,7 +155,8 @@ check_worktree() {
|
|
|
130
155
|
else
|
|
131
156
|
why=$(head -n 1 "$scratch/why"); : > "$scratch/made"
|
|
132
157
|
fi
|
|
133
|
-
out=$(awk 'FILENAME == ARGV[1] { made[$0]; next } !($0 in made)' "$scratch/made" "$scratch/ignored"
|
|
158
|
+
out=$(awk 'FILENAME == ARGV[1] { made[$0]; next } !($0 in made)' "$scratch/made" "$scratch/ignored" |
|
|
159
|
+
gpui_shells "$wt")
|
|
134
160
|
if [ -n "$out" ]; then
|
|
135
161
|
if [ -n "$why" ]; then add_problem " ignored files, all of them counted as work since $why:"
|
|
136
162
|
else add_problem " ignored files that its setup does not make again:"
|
package/herdr/README.md
CHANGED
|
@@ -1619,6 +1619,12 @@ ocnus task finish <space> <card>
|
|
|
1619
1619
|
removed with the worktree without a word. Without `just`, or in a repo with
|
|
1620
1620
|
no `made-by-setup` recipe, every ignored file counts as work, and it says
|
|
1621
1621
|
why.
|
|
1622
|
+
- **What gpui-shell writes into a mod's folder goes too**, in any repo, with
|
|
1623
|
+
or without `just`: each ignored `gpui-kit.d.ts`, which gpui-shell rewrites
|
|
1624
|
+
on every run, and an ignored `jsconfig.json` while it is still the one
|
|
1625
|
+
gpui-shell wrote, saying so, with a `gpui-kit.d.ts` beside it. gpui-shell
|
|
1626
|
+
writes that one only once and leaves it to you after, so a `jsconfig.json`
|
|
1627
|
+
you wrote or changed is still counted as work.
|
|
1622
1628
|
- **It forces nothing.** `git worktree remove` keeps git's own refusal, and
|
|
1623
1629
|
the branch is deleted only while it is still on the commit that was
|
|
1624
1630
|
checked.
|