@codebend3r/che 1.2.1 โ 1.2.3
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/README.md +271 -249
- package/bin/branchsync.py +258 -11
- package/bin/commands.py +15 -1
- package/bin/git/hard-reset-all-branches.py +250 -0
- package/bin/git/prune-worktrees.py +51 -13
- package/bin/git/sync-all-branches.py +14 -9
- package/bin/gitutils.py +3 -0
- package/package.json +1 -1
- package/shell/che.bash +17 -4
- package/shell/che.fish +13 -3
- package/shell/che.zsh +17 -4
- package/shell/completions/_che +8 -4
- package/shell/completions/che.bash +5 -3
- package/shell/completions/che.fish +13 -3
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""๐ฟ Remove every linked worktree in the current repository, then prune records.
|
|
3
3
|
|
|
4
|
-
The main worktree (the one containing .git) is always left untouched.
|
|
4
|
+
The main worktree (the one containing .git) is always left untouched. A locked
|
|
5
|
+
worktree is unlocked first, since a lock only guards against an accidental
|
|
6
|
+
removal and this command is the deliberate one. A worktree with uncommitted
|
|
7
|
+
changes is kept, lock and all, unless --force is given; one failure never stops
|
|
8
|
+
the rest.
|
|
5
9
|
|
|
6
10
|
Usage:
|
|
7
11
|
prune-worktrees.py [--dry-run] [--force]
|
|
8
12
|
|
|
9
13
|
Options:
|
|
10
14
|
--dry-run Show what would be removed, change nothing
|
|
11
|
-
--force
|
|
15
|
+
--force Remove worktrees with uncommitted changes too
|
|
12
16
|
--help Show help
|
|
13
17
|
|
|
14
18
|
Env:
|
|
@@ -22,7 +26,7 @@ from pathlib import Path
|
|
|
22
26
|
|
|
23
27
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
24
28
|
|
|
25
|
-
from gitutils import park_main_worktree, skip_git_hooks, worktrees
|
|
29
|
+
from gitutils import park_main_worktree, skip_git_hooks, worktree_is_clean, worktrees
|
|
26
30
|
from utils import (
|
|
27
31
|
add_bool_flag,
|
|
28
32
|
build_parser,
|
|
@@ -37,7 +41,7 @@ from utils import (
|
|
|
37
41
|
warning,
|
|
38
42
|
)
|
|
39
43
|
|
|
40
|
-
__version__ = "1.
|
|
44
|
+
__version__ = "1.4.0"
|
|
41
45
|
|
|
42
46
|
|
|
43
47
|
def main(argv: list[str] | None = None) -> int:
|
|
@@ -54,7 +58,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
54
58
|
add_bool_flag(
|
|
55
59
|
parser,
|
|
56
60
|
"--force",
|
|
57
|
-
help="
|
|
61
|
+
help="Remove worktrees with uncommitted changes too",
|
|
58
62
|
)
|
|
59
63
|
args = parser.parse_args(argv)
|
|
60
64
|
|
|
@@ -69,7 +73,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
69
73
|
main_wt = park_main_worktree("prune", dry_run=args.dry_run)
|
|
70
74
|
|
|
71
75
|
info("๐ Listing worktrees...")
|
|
72
|
-
linked =
|
|
76
|
+
linked = worktrees(main_wt)[1:]
|
|
73
77
|
|
|
74
78
|
if not linked:
|
|
75
79
|
success("โจ No linked worktrees. Running prune anyway... ๐")
|
|
@@ -83,20 +87,54 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
83
87
|
|
|
84
88
|
if args.dry_run:
|
|
85
89
|
warning(f"๐ต {len(linked)} worktree(s) would be removed:")
|
|
86
|
-
for
|
|
87
|
-
|
|
90
|
+
for worktree in linked:
|
|
91
|
+
note = " (locked; would unlock first)" if worktree.locked else ""
|
|
92
|
+
warning(f" โข ๐ชฆ {worktree.path}{note}")
|
|
88
93
|
info("๐ Would also run: git worktree prune --verbose")
|
|
89
94
|
dry_run_complete("removed")
|
|
90
95
|
return 0
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
removed = 0
|
|
98
|
+
kept: list[str] = []
|
|
99
|
+
for worktree in linked:
|
|
100
|
+
warning(f"๐๏ธ Removing: {worktree.path}")
|
|
101
|
+
# DELIBERATE DIVERGENCE: a lock used to abort the whole run with git's
|
|
102
|
+
# "cannot remove a locked working tree". Unlock, but only once the
|
|
103
|
+
# removal is certain to be allowed, so a kept worktree keeps its lock.
|
|
104
|
+
# A checkout whose directory is gone has no work left to lose.
|
|
105
|
+
gone = not Path(worktree.path).is_dir()
|
|
106
|
+
if not (args.force or gone) and not worktree_is_clean(worktree.path):
|
|
107
|
+
warning(" โญ๏ธ Uncommitted changes; kept (use --force to remove)")
|
|
108
|
+
kept.append(worktree.path)
|
|
109
|
+
continue
|
|
110
|
+
if worktree.locked:
|
|
111
|
+
info(" ๐ Unlocking")
|
|
112
|
+
run(["git", "worktree", "unlock", worktree.path], cwd=main_wt, check=False)
|
|
113
|
+
removal = run(
|
|
114
|
+
[
|
|
115
|
+
"git",
|
|
116
|
+
"worktree",
|
|
117
|
+
"remove",
|
|
118
|
+
*(["--force"] if args.force or gone else []),
|
|
119
|
+
worktree.path,
|
|
120
|
+
],
|
|
121
|
+
cwd=main_wt,
|
|
122
|
+
check=False,
|
|
123
|
+
)
|
|
124
|
+
if removal.returncode:
|
|
125
|
+
warning(f" โ Could not remove: {worktree.path}")
|
|
126
|
+
kept.append(worktree.path)
|
|
127
|
+
else:
|
|
128
|
+
removed += 1
|
|
96
129
|
|
|
97
130
|
info("๐งน Pruning stale worktree records...")
|
|
98
131
|
run(["git", "worktree", "prune", "--verbose"], cwd=main_wt)
|
|
99
|
-
success(f"โจ Removed {
|
|
132
|
+
success(f"โจ Removed {removed} worktree(s). ๐")
|
|
133
|
+
if kept:
|
|
134
|
+
warning(f"โ ๏ธ {len(kept)} worktree(s) kept:")
|
|
135
|
+
for path in kept:
|
|
136
|
+
warning(f" โข {path}")
|
|
137
|
+
return 1
|
|
100
138
|
return 0
|
|
101
139
|
|
|
102
140
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""๐ Update every branch and worktree,
|
|
2
|
+
"""๐ Update every branch and worktree, and prune what has been merged.
|
|
3
3
|
|
|
4
|
-
Fetch once,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Fetch once, delete branches (and their clean worktrees) that were merged into a
|
|
5
|
+
main or dev branch and whose upstream is gone, rebase the rest onto their
|
|
6
|
+
upstream (or origin/<branch>), and track new origin branches authored by you.
|
|
7
|
+
Worktrees stay worktrees and are updated in place. A branch whose changes are
|
|
8
|
+
all already upstream moves to its upstream instead of replaying them. Dirty
|
|
9
|
+
tracked/untracked work is saved in an exact recovery stash and restored with
|
|
10
|
+
its index. Conflicts are reported; independent branches continue. Nothing is
|
|
11
|
+
pushed. No local change is ever discarded.
|
|
8
12
|
|
|
9
13
|
Usage:
|
|
10
14
|
sync-all-branches.py [--dry-run] [--author=EMAIL] [--limit=N]
|
|
@@ -45,7 +49,7 @@ from utils import (
|
|
|
45
49
|
warning,
|
|
46
50
|
)
|
|
47
51
|
|
|
48
|
-
__version__ = "3.
|
|
52
|
+
__version__ = "3.2.0"
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
def track_new(sync: BranchSync, author: str, limit: int) -> list[str]:
|
|
@@ -79,7 +83,7 @@ def track_new(sync: BranchSync, author: str, limit: int) -> list[str]:
|
|
|
79
83
|
def main(argv: list[str] | None = None) -> int:
|
|
80
84
|
parser = build_parser(
|
|
81
85
|
prog="sync-all-branches",
|
|
82
|
-
description="๐ Update every branch and worktree,
|
|
86
|
+
description="๐ Update every branch and worktree, and prune what has been merged.",
|
|
83
87
|
)
|
|
84
88
|
add_bool_flag(
|
|
85
89
|
parser,
|
|
@@ -119,8 +123,9 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
119
123
|
original = current_branch(root) or run_output(["git", "rev-parse", "--short", "HEAD"], cwd=root)
|
|
120
124
|
info(f"๐ Keeping caller checkout: {original}")
|
|
121
125
|
# DELIBERATE DIVERGENCE: the old sync parked on main and delegated cleanup.
|
|
122
|
-
# Preserve active workspaces instead, and never
|
|
123
|
-
# branch merely because its remote was deleted
|
|
126
|
+
# Preserve active workspaces instead, and never delete a gone-upstream
|
|
127
|
+
# branch merely because its remote was deleted: only once it is proven
|
|
128
|
+
# merged (BranchSync.drop_gone). Dry-run must not fetch.
|
|
124
129
|
if args.dry_run:
|
|
125
130
|
info("๐ต Cached remote refs only; no fetch. Results reflect the last fetch.")
|
|
126
131
|
else:
|
package/bin/gitutils.py
CHANGED
|
@@ -142,6 +142,7 @@ def local_branches(*fields: str, sort: str = "", cwd: str | Path | None = None)
|
|
|
142
142
|
class Worktree(NamedTuple):
|
|
143
143
|
path: str
|
|
144
144
|
branch: str # "" when detached (or bare): it pins no branch
|
|
145
|
+
locked: bool = False # `git worktree lock`: git refuses to remove or prune it
|
|
145
146
|
|
|
146
147
|
|
|
147
148
|
def worktrees(cwd: str | Path | None = None) -> list[Worktree]:
|
|
@@ -162,6 +163,8 @@ def worktrees(cwd: str | Path | None = None) -> list[Worktree]:
|
|
|
162
163
|
# Every record opens with its `worktree` line, so this belongs to
|
|
163
164
|
# the last one appended.
|
|
164
165
|
found[-1] = found[-1]._replace(branch=line.removeprefix("branch refs/heads/"))
|
|
166
|
+
elif line == "locked" or line.startswith("locked "):
|
|
167
|
+
found[-1] = found[-1]._replace(locked=True)
|
|
165
168
|
return found
|
|
166
169
|
|
|
167
170
|
|
package/package.json
CHANGED
package/shell/che.bash
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# che 1.2.
|
|
1
|
+
# che 1.2.3 - generated file, do not edit.
|
|
2
2
|
#
|
|
3
3
|
# Generated from bin/commands.py by `che install`.
|
|
4
4
|
# To change a wrapper, edit that manifest and run `che install` again.
|
|
@@ -59,7 +59,8 @@ _che_restore_aliases() {
|
|
|
59
59
|
|
|
60
60
|
_che_stash_aliases che_notify che all-actions all-actions-watch \
|
|
61
61
|
checkout-my-branches clean-stale-branches clean-stale-branches-dr \
|
|
62
|
-
|
|
62
|
+
hard-reset-all-branches hard-reset-all-branches-dr prune-worktrees \
|
|
63
|
+
prune-worktrees-dr sync-all-branches sync-all-branches-dr \
|
|
63
64
|
update-from-origin update-local-branches show-codecs fix-codecs \
|
|
64
65
|
fix-codecs-dr find-video-mkv-issues validate-video-files \
|
|
65
66
|
scan-videos-audio-language remove-metadata rename-video-file \
|
|
@@ -126,6 +127,18 @@ clean-stale-branches-dr() {
|
|
|
126
127
|
che_notify 7 $?
|
|
127
128
|
}
|
|
128
129
|
|
|
130
|
+
# Check out every local branch and hard reset it to origin/<branch>
|
|
131
|
+
hard-reset-all-branches() {
|
|
132
|
+
DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/hard-reset-all-branches.py" "$@"
|
|
133
|
+
che_notify 4 $?
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
# Check out every local branch and hard reset it to origin/<branch> (preview only)
|
|
137
|
+
hard-reset-all-branches-dr() {
|
|
138
|
+
DRY_RUN=true "$CHE_PYTHON" "$CHE_BIN/git/hard-reset-all-branches.py" "$@"
|
|
139
|
+
che_notify 7 $?
|
|
140
|
+
}
|
|
141
|
+
|
|
129
142
|
# Remove every linked worktree, then prune stale admin records
|
|
130
143
|
prune-worktrees() {
|
|
131
144
|
DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/prune-worktrees.py" "$@"
|
|
@@ -138,13 +151,13 @@ prune-worktrees-dr() {
|
|
|
138
151
|
che_notify 7 $?
|
|
139
152
|
}
|
|
140
153
|
|
|
141
|
-
# Update every branch and worktree,
|
|
154
|
+
# Update every branch and worktree, pruning what has been merged
|
|
142
155
|
sync-all-branches() {
|
|
143
156
|
DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/sync-all-branches.py" "$@"
|
|
144
157
|
che_notify 7 $?
|
|
145
158
|
}
|
|
146
159
|
|
|
147
|
-
# Update every branch and worktree,
|
|
160
|
+
# Update every branch and worktree, pruning what has been merged (preview only)
|
|
148
161
|
sync-all-branches-dr() {
|
|
149
162
|
DRY_RUN=true "$CHE_PYTHON" "$CHE_BIN/git/sync-all-branches.py" "$@"
|
|
150
163
|
che_notify 7 $?
|
package/shell/che.fish
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# che 1.2.
|
|
1
|
+
# che 1.2.3 - generated file, do not edit.
|
|
2
2
|
#
|
|
3
3
|
# Generated from bin/commands.py by `che install`.
|
|
4
4
|
# To change a wrapper, edit that manifest and run `che install` again.
|
|
@@ -68,6 +68,16 @@ function clean-stale-branches-dr --description 'Delete local branches whose upst
|
|
|
68
68
|
che_notify 7 $status
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
+
function hard-reset-all-branches --description 'Check out every local branch and hard reset it to origin/<branch>'
|
|
72
|
+
env DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/hard-reset-all-branches.py" $argv
|
|
73
|
+
che_notify 4 $status
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
function hard-reset-all-branches-dr --description 'Check out every local branch and hard reset it to origin/<branch> (preview only)'
|
|
77
|
+
env DRY_RUN=true "$CHE_PYTHON" "$CHE_BIN/git/hard-reset-all-branches.py" $argv
|
|
78
|
+
che_notify 7 $status
|
|
79
|
+
end
|
|
80
|
+
|
|
71
81
|
function prune-worktrees --description 'Remove every linked worktree, then prune stale admin records'
|
|
72
82
|
env DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/prune-worktrees.py" $argv
|
|
73
83
|
che_notify 4 $status
|
|
@@ -78,12 +88,12 @@ function prune-worktrees-dr --description 'Remove every linked worktree, then pr
|
|
|
78
88
|
che_notify 7 $status
|
|
79
89
|
end
|
|
80
90
|
|
|
81
|
-
function sync-all-branches --description 'Update every branch and worktree,
|
|
91
|
+
function sync-all-branches --description 'Update every branch and worktree, pruning what has been merged'
|
|
82
92
|
env DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/sync-all-branches.py" $argv
|
|
83
93
|
che_notify 7 $status
|
|
84
94
|
end
|
|
85
95
|
|
|
86
|
-
function sync-all-branches-dr --description 'Update every branch and worktree,
|
|
96
|
+
function sync-all-branches-dr --description 'Update every branch and worktree, pruning what has been merged (preview only)'
|
|
87
97
|
env DRY_RUN=true "$CHE_PYTHON" "$CHE_BIN/git/sync-all-branches.py" $argv
|
|
88
98
|
che_notify 7 $status
|
|
89
99
|
end
|
package/shell/che.zsh
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# che 1.2.
|
|
1
|
+
# che 1.2.3 - generated file, do not edit.
|
|
2
2
|
#
|
|
3
3
|
# Generated from bin/commands.py by `che install`.
|
|
4
4
|
# To change a wrapper, edit that manifest and run `che install` again.
|
|
@@ -65,7 +65,8 @@ _che_restore_aliases() {
|
|
|
65
65
|
|
|
66
66
|
_che_stash_aliases che_notify che all-actions all-actions-watch \
|
|
67
67
|
checkout-my-branches clean-stale-branches clean-stale-branches-dr \
|
|
68
|
-
|
|
68
|
+
hard-reset-all-branches hard-reset-all-branches-dr prune-worktrees \
|
|
69
|
+
prune-worktrees-dr sync-all-branches sync-all-branches-dr \
|
|
69
70
|
update-from-origin update-local-branches show-codecs fix-codecs \
|
|
70
71
|
fix-codecs-dr find-video-mkv-issues validate-video-files \
|
|
71
72
|
scan-videos-audio-language remove-metadata rename-video-file \
|
|
@@ -132,6 +133,18 @@ clean-stale-branches-dr() {
|
|
|
132
133
|
che_notify 7 $?
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
# Check out every local branch and hard reset it to origin/<branch>
|
|
137
|
+
hard-reset-all-branches() {
|
|
138
|
+
DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/hard-reset-all-branches.py" "$@"
|
|
139
|
+
che_notify 4 $?
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
# Check out every local branch and hard reset it to origin/<branch> (preview only)
|
|
143
|
+
hard-reset-all-branches-dr() {
|
|
144
|
+
DRY_RUN=true "$CHE_PYTHON" "$CHE_BIN/git/hard-reset-all-branches.py" "$@"
|
|
145
|
+
che_notify 7 $?
|
|
146
|
+
}
|
|
147
|
+
|
|
135
148
|
# Remove every linked worktree, then prune stale admin records
|
|
136
149
|
prune-worktrees() {
|
|
137
150
|
DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/prune-worktrees.py" "$@"
|
|
@@ -144,13 +157,13 @@ prune-worktrees-dr() {
|
|
|
144
157
|
che_notify 7 $?
|
|
145
158
|
}
|
|
146
159
|
|
|
147
|
-
# Update every branch and worktree,
|
|
160
|
+
# Update every branch and worktree, pruning what has been merged
|
|
148
161
|
sync-all-branches() {
|
|
149
162
|
DRY_RUN=false "$CHE_PYTHON" "$CHE_BIN/git/sync-all-branches.py" "$@"
|
|
150
163
|
che_notify 7 $?
|
|
151
164
|
}
|
|
152
165
|
|
|
153
|
-
# Update every branch and worktree,
|
|
166
|
+
# Update every branch and worktree, pruning what has been merged (preview only)
|
|
154
167
|
sync-all-branches-dr() {
|
|
155
168
|
DRY_RUN=true "$CHE_PYTHON" "$CHE_BIN/git/sync-all-branches.py" "$@"
|
|
156
169
|
che_notify 7 $?
|
package/shell/completions/_che
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#compdef che
|
|
2
|
-
# che 1.2.
|
|
2
|
+
# che 1.2.3 - generated file, do not edit.
|
|
3
3
|
#
|
|
4
4
|
# Generated from bin/commands.py by `che install`.
|
|
5
5
|
# To change a wrapper, edit that manifest and run `che install` again.
|
|
@@ -11,6 +11,8 @@ _che_flags_for() {
|
|
|
11
11
|
checkout-my-branches) print -r -- '--author= --limit= --help' ;;
|
|
12
12
|
clean-stale-branches) print -r -- '--dry-run --protect= --help' ;;
|
|
13
13
|
clean-stale-branches-dr) print -r -- '--dry-run --protect= --help' ;;
|
|
14
|
+
hard-reset-all-branches) print -r -- '--dry-run --force --help' ;;
|
|
15
|
+
hard-reset-all-branches-dr) print -r -- '--dry-run --force --help' ;;
|
|
14
16
|
prune-worktrees) print -r -- '--dry-run --force --help' ;;
|
|
15
17
|
prune-worktrees-dr) print -r -- '--dry-run --force --help' ;;
|
|
16
18
|
sync-all-branches) print -r -- '--dry-run --author= --limit= --help' ;;
|
|
@@ -83,10 +85,12 @@ _che() {
|
|
|
83
85
|
'checkout-my-branches:Check out recent remote branches you authored that aren'"'"'t local yet'
|
|
84
86
|
'clean-stale-branches:Delete local branches whose upstream is gone'
|
|
85
87
|
'clean-stale-branches-dr:Delete local branches whose upstream is gone (preview)'
|
|
88
|
+
'hard-reset-all-branches:Check out every local branch and hard reset it to origin/<branch>'
|
|
89
|
+
'hard-reset-all-branches-dr:Check out every local branch and hard reset it to origin/<branch> (preview)'
|
|
86
90
|
'prune-worktrees:Remove every linked worktree, then prune stale admin records'
|
|
87
91
|
'prune-worktrees-dr:Remove every linked worktree, then prune stale admin records (preview)'
|
|
88
|
-
'sync-all-branches:Update every branch and worktree,
|
|
89
|
-
'sync-all-branches-dr:Update every branch and worktree,
|
|
92
|
+
'sync-all-branches:Update every branch and worktree, pruning what has been merged'
|
|
93
|
+
'sync-all-branches-dr:Update every branch and worktree, pruning what has been merged (preview)'
|
|
90
94
|
'update-from-origin:Alias of sync-all-branches'
|
|
91
95
|
'update-local-branches:Rebase every local branch that has an upstream onto origin'
|
|
92
96
|
'show-codecs:Report media files outside the Direct Play codec/container set'
|
|
@@ -143,4 +147,4 @@ _che_wrapper() {
|
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
compdef _che che
|
|
146
|
-
compdef _che_wrapper all-actions all-actions-watch checkout-my-branches clean-stale-branches clean-stale-branches-dr prune-worktrees prune-worktrees-dr sync-all-branches sync-all-branches-dr update-from-origin update-local-branches show-codecs fix-codecs fix-codecs-dr find-video-mkv-issues validate-video-files scan-videos-audio-language remove-metadata rename-video-file delete-duplicate-videos delete-duplicate-videos-dr video-list detect-green-magenta-videos find-movie-by-year largest-tv-shows delete-by-ext delete-by-ext-dr delete-empty-folders delete-empty-folders-dr delete-smb-files delete-smb-files-dr files-under-size files-under-size-dr find-largest-files make-alpha-dir compress-folders list-permission mount-all-drives eject-all-drives eject-all-drives-dr ping-nas update-brew update-brew-dr btop
|
|
150
|
+
compdef _che_wrapper all-actions all-actions-watch checkout-my-branches clean-stale-branches clean-stale-branches-dr hard-reset-all-branches hard-reset-all-branches-dr prune-worktrees prune-worktrees-dr sync-all-branches sync-all-branches-dr update-from-origin update-local-branches show-codecs fix-codecs fix-codecs-dr find-video-mkv-issues validate-video-files scan-videos-audio-language remove-metadata rename-video-file delete-duplicate-videos delete-duplicate-videos-dr video-list detect-green-magenta-videos find-movie-by-year largest-tv-shows delete-by-ext delete-by-ext-dr delete-empty-folders delete-empty-folders-dr delete-smb-files delete-smb-files-dr files-under-size files-under-size-dr find-largest-files make-alpha-dir compress-folders list-permission mount-all-drives eject-all-drives eject-all-drives-dr ping-nas update-brew update-brew-dr btop
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# che 1.2.
|
|
1
|
+
# che 1.2.3 - generated file, do not edit.
|
|
2
2
|
#
|
|
3
3
|
# Generated from bin/commands.py by `che install`.
|
|
4
4
|
# To change a wrapper, edit that manifest and run `che install` again.
|
|
@@ -11,6 +11,8 @@ _che_flags_for() {
|
|
|
11
11
|
checkout-my-branches) echo "--author= --limit= --help" ;;
|
|
12
12
|
clean-stale-branches) echo "--dry-run --protect= --help" ;;
|
|
13
13
|
clean-stale-branches-dr) echo "--dry-run --protect= --help" ;;
|
|
14
|
+
hard-reset-all-branches) echo "--dry-run --force --help" ;;
|
|
15
|
+
hard-reset-all-branches-dr) echo "--dry-run --force --help" ;;
|
|
14
16
|
prune-worktrees) echo "--dry-run --force --help" ;;
|
|
15
17
|
prune-worktrees-dr) echo "--dry-run --force --help" ;;
|
|
16
18
|
sync-all-branches) echo "--dry-run --author= --limit= --help" ;;
|
|
@@ -92,7 +94,7 @@ _che_complete() {
|
|
|
92
94
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
93
95
|
|
|
94
96
|
if [ "$COMP_CWORD" -eq 1 ]; then
|
|
95
|
-
_che_reply "" < <(compgen -W "all-actions all-actions-watch checkout-my-branches clean-stale-branches clean-stale-branches-dr prune-worktrees prune-worktrees-dr sync-all-branches sync-all-branches-dr update-from-origin update-local-branches show-codecs fix-codecs fix-codecs-dr find-video-mkv-issues validate-video-files scan-videos-audio-language remove-metadata rename-video-file delete-duplicate-videos delete-duplicate-videos-dr video-list detect-green-magenta-videos find-movie-by-year largest-tv-shows delete-by-ext delete-by-ext-dr delete-empty-folders delete-empty-folders-dr delete-smb-files delete-smb-files-dr files-under-size files-under-size-dr find-largest-files make-alpha-dir compress-folders list-permission mount-all-drives eject-all-drives eject-all-drives-dr ping-nas update-brew update-brew-dr btop install update doctor uninstall list completions" -- "$cur")
|
|
97
|
+
_che_reply "" < <(compgen -W "all-actions all-actions-watch checkout-my-branches clean-stale-branches clean-stale-branches-dr hard-reset-all-branches hard-reset-all-branches-dr prune-worktrees prune-worktrees-dr sync-all-branches sync-all-branches-dr update-from-origin update-local-branches show-codecs fix-codecs fix-codecs-dr find-video-mkv-issues validate-video-files scan-videos-audio-language remove-metadata rename-video-file delete-duplicate-videos delete-duplicate-videos-dr video-list detect-green-magenta-videos find-movie-by-year largest-tv-shows delete-by-ext delete-by-ext-dr delete-empty-folders delete-empty-folders-dr delete-smb-files delete-smb-files-dr files-under-size files-under-size-dr find-largest-files make-alpha-dir compress-folders list-permission mount-all-drives eject-all-drives eject-all-drives-dr ping-nas update-brew update-brew-dr btop install update doctor uninstall list completions" -- "$cur")
|
|
96
98
|
return
|
|
97
99
|
fi
|
|
98
100
|
|
|
@@ -104,4 +106,4 @@ _che_complete_wrapper() {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
complete -o nospace -F _che_complete che
|
|
107
|
-
complete -o nospace -F _che_complete_wrapper all-actions all-actions-watch checkout-my-branches clean-stale-branches clean-stale-branches-dr prune-worktrees prune-worktrees-dr sync-all-branches sync-all-branches-dr update-from-origin update-local-branches show-codecs fix-codecs fix-codecs-dr find-video-mkv-issues validate-video-files scan-videos-audio-language remove-metadata rename-video-file delete-duplicate-videos delete-duplicate-videos-dr video-list detect-green-magenta-videos find-movie-by-year largest-tv-shows delete-by-ext delete-by-ext-dr delete-empty-folders delete-empty-folders-dr delete-smb-files delete-smb-files-dr files-under-size files-under-size-dr find-largest-files make-alpha-dir compress-folders list-permission mount-all-drives eject-all-drives eject-all-drives-dr ping-nas update-brew update-brew-dr btop
|
|
109
|
+
complete -o nospace -F _che_complete_wrapper all-actions all-actions-watch checkout-my-branches clean-stale-branches clean-stale-branches-dr hard-reset-all-branches hard-reset-all-branches-dr prune-worktrees prune-worktrees-dr sync-all-branches sync-all-branches-dr update-from-origin update-local-branches show-codecs fix-codecs fix-codecs-dr find-video-mkv-issues validate-video-files scan-videos-audio-language remove-metadata rename-video-file delete-duplicate-videos delete-duplicate-videos-dr video-list detect-green-magenta-videos find-movie-by-year largest-tv-shows delete-by-ext delete-by-ext-dr delete-empty-folders delete-empty-folders-dr delete-smb-files delete-smb-files-dr files-under-size files-under-size-dr find-largest-files make-alpha-dir compress-folders list-permission mount-all-drives eject-all-drives eject-all-drives-dr ping-nas update-brew update-brew-dr btop
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# che 1.2.
|
|
1
|
+
# che 1.2.3 - generated file, do not edit.
|
|
2
2
|
#
|
|
3
3
|
# Generated from bin/commands.py by `che install`.
|
|
4
4
|
# To change a wrapper, edit that manifest and run `che install` again.
|
|
@@ -9,10 +9,12 @@ complete -c che -n __fish_use_subcommand -a all-actions-watch -d 'Same as all-ac
|
|
|
9
9
|
complete -c che -n __fish_use_subcommand -a checkout-my-branches -d 'Check out recent remote branches you authored that aren\'t local yet'
|
|
10
10
|
complete -c che -n __fish_use_subcommand -a clean-stale-branches -d 'Delete local branches whose upstream is gone'
|
|
11
11
|
complete -c che -n __fish_use_subcommand -a clean-stale-branches-dr -d 'Delete local branches whose upstream is gone (preview)'
|
|
12
|
+
complete -c che -n __fish_use_subcommand -a hard-reset-all-branches -d 'Check out every local branch and hard reset it to origin/<branch>'
|
|
13
|
+
complete -c che -n __fish_use_subcommand -a hard-reset-all-branches-dr -d 'Check out every local branch and hard reset it to origin/<branch> (preview)'
|
|
12
14
|
complete -c che -n __fish_use_subcommand -a prune-worktrees -d 'Remove every linked worktree, then prune stale admin records'
|
|
13
15
|
complete -c che -n __fish_use_subcommand -a prune-worktrees-dr -d 'Remove every linked worktree, then prune stale admin records (preview)'
|
|
14
|
-
complete -c che -n __fish_use_subcommand -a sync-all-branches -d 'Update every branch and worktree,
|
|
15
|
-
complete -c che -n __fish_use_subcommand -a sync-all-branches-dr -d 'Update every branch and worktree,
|
|
16
|
+
complete -c che -n __fish_use_subcommand -a sync-all-branches -d 'Update every branch and worktree, pruning what has been merged'
|
|
17
|
+
complete -c che -n __fish_use_subcommand -a sync-all-branches-dr -d 'Update every branch and worktree, pruning what has been merged (preview)'
|
|
16
18
|
complete -c che -n __fish_use_subcommand -a update-from-origin -d 'Alias of sync-all-branches'
|
|
17
19
|
complete -c che -n __fish_use_subcommand -a update-local-branches -d 'Rebase every local branch that has an upstream onto origin'
|
|
18
20
|
complete -c che -n __fish_use_subcommand -a show-codecs -d 'Report media files outside the Direct Play codec/container set'
|
|
@@ -74,6 +76,10 @@ complete -c che -n "__fish_seen_subcommand_from clean-stale-branches" -l dry-run
|
|
|
74
76
|
complete -c che -n "__fish_seen_subcommand_from clean-stale-branches" -l protect -r
|
|
75
77
|
complete -c che -n "__fish_seen_subcommand_from clean-stale-branches-dr" -l dry-run
|
|
76
78
|
complete -c che -n "__fish_seen_subcommand_from clean-stale-branches-dr" -l protect -r
|
|
79
|
+
complete -c che -n "__fish_seen_subcommand_from hard-reset-all-branches" -l dry-run
|
|
80
|
+
complete -c che -n "__fish_seen_subcommand_from hard-reset-all-branches" -l force
|
|
81
|
+
complete -c che -n "__fish_seen_subcommand_from hard-reset-all-branches-dr" -l dry-run
|
|
82
|
+
complete -c che -n "__fish_seen_subcommand_from hard-reset-all-branches-dr" -l force
|
|
77
83
|
complete -c che -n "__fish_seen_subcommand_from prune-worktrees" -l dry-run
|
|
78
84
|
complete -c che -n "__fish_seen_subcommand_from prune-worktrees" -l force
|
|
79
85
|
complete -c che -n "__fish_seen_subcommand_from prune-worktrees-dr" -l dry-run
|
|
@@ -233,6 +239,10 @@ complete -c clean-stale-branches -l dry-run
|
|
|
233
239
|
complete -c clean-stale-branches -l protect -r
|
|
234
240
|
complete -c clean-stale-branches-dr -l dry-run
|
|
235
241
|
complete -c clean-stale-branches-dr -l protect -r
|
|
242
|
+
complete -c hard-reset-all-branches -l dry-run
|
|
243
|
+
complete -c hard-reset-all-branches -l force
|
|
244
|
+
complete -c hard-reset-all-branches-dr -l dry-run
|
|
245
|
+
complete -c hard-reset-all-branches-dr -l force
|
|
236
246
|
complete -c prune-worktrees -l dry-run
|
|
237
247
|
complete -c prune-worktrees -l force
|
|
238
248
|
complete -c prune-worktrees-dr -l dry-run
|