git-machete 3.40.0__tar.gz → 3.41.0__tar.gz
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.
- {git_machete-3.40.0/git_machete.egg-info → git_machete-3.41.0}/PKG-INFO +1 -1
- {git_machete-3.40.0 → git_machete-3.41.0}/completion/git-machete.completion.bash +116 -10
- {git_machete-3.40.0 → git_machete-3.41.0}/completion/git-machete.completion.zsh +70 -38
- {git_machete-3.40.0 → git_machete-3.41.0}/completion/git-machete.fish +53 -39
- {git_machete-3.40.0 → git_machete-3.41.0}/docs/man/git-machete.1 +56 -9
- git_machete-3.41.0/git_machete/__init__.py +1 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/annotation.py +3 -3
- git_machete-3.41.0/git_machete/cli.py +540 -0
- git_machete-3.41.0/git_machete/cli_commands.py +537 -0
- git_machete-3.41.0/git_machete/cli_parser.py +528 -0
- git_machete-3.41.0/git_machete/client/advance.py +99 -0
- git_machete-3.41.0/git_machete/client/anno.py +21 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/base.py +745 -890
- git_machete-3.41.0/git_machete/client/branch_layout.py +107 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/diff.py +1 -1
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/discover.py +47 -42
- git_machete-3.41.0/git_machete/client/fork_point.py +118 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/go_interactive.py +50 -30
- git_machete-3.41.0/git_machete/client/go_show.py +125 -0
- git_machete-3.41.0/git_machete/client/list.py +41 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/log.py +4 -3
- git_machete-3.41.0/git_machete/client/reapply.py +18 -0
- git_machete-3.41.0/git_machete/client/rename.py +42 -0
- git_machete-3.41.0/git_machete/client/slide_out.py +136 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/squash.py +26 -17
- git_machete-3.41.0/git_machete/client/state.py +269 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/status.py +149 -93
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/traverse.py +143 -142
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/update.py +11 -7
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/with_code_hosting.py +152 -122
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/code_hosting.py +5 -6
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/config.py +9 -4
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/generated_docs.py +44 -7
- git_machete-3.40.0/git_machete/git_operations.py → git_machete-3.41.0/git_machete/git.py +199 -135
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/github.py +29 -22
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/gitlab.py +18 -14
- git_machete-3.41.0/git_machete/help.py +74 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/options.py +5 -3
- git_machete-3.41.0/git_machete/utils/__init__.py +29 -0
- git_machete-3.41.0/git_machete/utils/_subproc.py +37 -0
- git_machete-3.41.0/git_machete/utils/cmd.py +145 -0
- git_machete-3.41.0/git_machete/utils/collections.py +46 -0
- git_machete-3.41.0/git_machete/utils/date.py +12 -0
- git_machete-3.41.0/git_machete/utils/debug_log.py +61 -0
- git_machete-3.41.0/git_machete/utils/exceptions.py +63 -0
- git_machete-3.41.0/git_machete/utils/fs.py +58 -0
- git_machete-3.41.0/git_machete/utils/markup.py +112 -0
- git_machete-3.41.0/git_machete/utils/paths.py +93 -0
- git_machete-3.41.0/git_machete/utils/terminal.py +111 -0
- {git_machete-3.40.0 → git_machete-3.41.0/git_machete.egg-info}/PKG-INFO +1 -1
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete.egg-info/SOURCES.txt +21 -3
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete.egg-info/top_level.txt +1 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/setup.py +1 -1
- git_machete-3.40.0/git_machete/__init__.py +0 -1
- git_machete-3.40.0/git_machete/cli.py +0 -992
- git_machete-3.40.0/git_machete/client/advance.py +0 -102
- git_machete-3.40.0/git_machete/client/anno.py +0 -18
- git_machete-3.40.0/git_machete/client/fork_point.py +0 -34
- git_machete-3.40.0/git_machete/client/go_show.py +0 -54
- git_machete-3.40.0/git_machete/client/slide_out.py +0 -157
- git_machete-3.40.0/git_machete/utils.py +0 -554
- {git_machete-3.40.0 → git_machete-3.41.0}/LICENSE +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/MANIFEST.in +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/README.md +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/completion/__init__.py +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/bin.py +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/client/__init__.py +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete/constants.py +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete.egg-info/dependency_links.txt +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/git_machete.egg-info/entry_points.txt +0 -0
- {git_machete-3.40.0 → git_machete-3.41.0}/setup.cfg +0 -0
|
@@ -1,7 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
|
+
# Check if any of the given options appear in the current command line words.
|
|
4
|
+
# Usage: _git_machete_seen_opt --opt1 -o --opt2 ...
|
|
5
|
+
_git_machete_seen_opt() {
|
|
6
|
+
local opt
|
|
7
|
+
for opt in "$@"; do
|
|
8
|
+
local word
|
|
9
|
+
for word in "${COMP_WORDS[@]}"; do
|
|
10
|
+
# Handle options with = (e.g. --onto= matches --onto=* and --onto)
|
|
11
|
+
if [[ "$opt" == *"=" ]]; then
|
|
12
|
+
if [[ "$word" == "${opt%=}" || "$word" == "${opt}"* ]]; then
|
|
13
|
+
return 0
|
|
14
|
+
fi
|
|
15
|
+
else
|
|
16
|
+
if [[ "$word" == "$opt" ]]; then
|
|
17
|
+
return 0
|
|
18
|
+
fi
|
|
19
|
+
fi
|
|
20
|
+
done
|
|
21
|
+
done
|
|
22
|
+
return 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# Apply mutual exclusion to a space-separated options string.
|
|
26
|
+
# Each subsequent argument is a mutually-exclusive group of options (space-separated).
|
|
27
|
+
# If any option in a group is present on the current command line,
|
|
28
|
+
# all options from that group are removed from the resulting string.
|
|
29
|
+
# Usage: result=$(_git_machete_filter_mutex_groups "<opts>" "<group1>" "<group2>" ...)
|
|
30
|
+
_git_machete_filter_mutex_groups() {
|
|
31
|
+
local opts=" $1 "
|
|
32
|
+
shift
|
|
33
|
+
local group
|
|
34
|
+
for group in "$@"; do
|
|
35
|
+
if _git_machete_seen_opt $group; then
|
|
36
|
+
local opt
|
|
37
|
+
for opt in $group; do
|
|
38
|
+
opts="${opts// $opt / }"
|
|
39
|
+
done
|
|
40
|
+
fi
|
|
41
|
+
done
|
|
42
|
+
opts="${opts# }"
|
|
43
|
+
opts="${opts% }"
|
|
44
|
+
echo "$opts"
|
|
45
|
+
}
|
|
46
|
+
|
|
3
47
|
_git_machete() {
|
|
4
|
-
local cmds="add advance anno completion delete-unmanaged diff discover edit file fork-point github gitlab go help is-managed list log reapply show slide-out squash status traverse update version"
|
|
48
|
+
local cmds="add advance anno completion delete-unmanaged diff discover edit file fork-point github gitlab go help is-managed list log reapply rename show slide-out squash status traverse update version"
|
|
5
49
|
local help_topics="$cmds config format hooks"
|
|
6
50
|
|
|
7
51
|
local categories="addable childless managed slidable slidable-after unmanaged with-overridden-fork-point"
|
|
@@ -11,6 +55,7 @@ _git_machete() {
|
|
|
11
55
|
local locations="current $directions"
|
|
12
56
|
local opt_color_args="always auto never"
|
|
13
57
|
local opt_return_to_args="HERE NEAREST-REMAINING STAY"
|
|
58
|
+
local opt_squash_merge_detection_args="exact none simple"
|
|
14
59
|
local opt_start_from_args="HERE ROOT FIRST-ROOT"
|
|
15
60
|
local shells="bash fish zsh"
|
|
16
61
|
|
|
@@ -21,7 +66,7 @@ _git_machete() {
|
|
|
21
66
|
local delete_unmanaged_opts="-y --yes"
|
|
22
67
|
local diff_opts="-s --stat"
|
|
23
68
|
local discover_opts="-C --checked-out-since= -l --list-commits -r --roots= -y --yes"
|
|
24
|
-
local fork_point_opts="--inferred --override-to= --override-to-inferred --override-to-parent --unset-override"
|
|
69
|
+
local fork_point_opts="--explain --inferred --override-to= --override-to-inferred --override-to-parent --unset-override"
|
|
25
70
|
local githublab_anno_opts="--with-urls"
|
|
26
71
|
local githublab_create_opts="--draft --title= -U --update-related-descriptions -y --yes"
|
|
27
72
|
local githublab_checkout_opts="--all --by= --mine"
|
|
@@ -29,10 +74,11 @@ _git_machete() {
|
|
|
29
74
|
local githublab_retarget_opts="-b --branch= --ignore-if-missing -U --update-related-descriptions"
|
|
30
75
|
local githublab_update_descriptions_opts="--all --by= --mine --related"
|
|
31
76
|
local reapply_opts="-f --fork-point="
|
|
77
|
+
local rename_opts="-b --branch= --repoint-tracking"
|
|
32
78
|
local slide_out_opts="-d --down-fork-point= --delete -M --merge -n --no-edit-merge --no-interactive-rebase --no-rebase --removed-from-remote"
|
|
33
79
|
local squash_opts="-f --fork-point="
|
|
34
|
-
local status_opts="--color= -L --list-commits-with-hashes -l --list-commits --no-detect-squash-merges"
|
|
35
|
-
local traverse_opts="-F --fetch -H --sync-github-prs -L --sync-gitlab-mrs -l --list-commits -M --merge -n --no-detect-squash-merges --no-edit-merge --no-interactive-rebase --no-push --no-push-untracked --push --push-untracked --return-to= --start-from= --stop-after= -w --whole -W -y --yes"
|
|
80
|
+
local status_opts="--color= -L --list-commits-with-hashes -l --list-commits --no-detect-squash-merges --squash-merge-detection="
|
|
81
|
+
local traverse_opts="-F --fetch -H --sync-github-prs -L --sync-gitlab-mrs -l --list-commits -M --merge -n --no-detect-squash-merges --no-edit-merge --no-interactive-rebase --no-push --no-push-untracked --push --push-untracked --return-to= --squash-merge-detection= --start-from= --stop-after= -w --whole -W -y --yes"
|
|
36
82
|
local update_opts="-f --fork-point= -M --merge -n --no-edit-merge --no-interactive-rebase"
|
|
37
83
|
|
|
38
84
|
cur=${COMP_WORDS[$COMP_CWORD]}
|
|
@@ -43,17 +89,35 @@ _git_machete() {
|
|
|
43
89
|
--down-fork-point=*|--fork-point=*|--override-to=*) __gitcomp "$(__git_refs)" "" "${cur##--*=}" ;;
|
|
44
90
|
--return-to=*) __gitcomp "$opt_return_to_args" "" "${cur##--return-to=}" ;;
|
|
45
91
|
--roots=*) __gitcomp "$(__git_heads)" "" "${cur##--roots=}" ;;
|
|
92
|
+
--squash-merge-detection=*) __gitcomp "$opt_squash_merge_detection_args" "" "${cur##--squash-merge-detection=}" ;;
|
|
46
93
|
--start-from=*) __gitcomp "$opt_start_from_args $(__git_heads)" "" "${cur##--start-from=}" ;;
|
|
47
94
|
--stop-after=*) __gitcomp "$(__git_heads)" "" "${cur##--stop-after=}" ;;
|
|
48
95
|
-*)
|
|
49
96
|
case ${COMP_WORDS[2]} in
|
|
50
|
-
add)
|
|
97
|
+
add)
|
|
98
|
+
local filtered_add_opts
|
|
99
|
+
filtered_add_opts=$(_git_machete_filter_mutex_groups "$add_opts" \
|
|
100
|
+
"-R --as-root -f --as-first-child" \
|
|
101
|
+
"-R --as-root -o --onto=")
|
|
102
|
+
__gitcomp "$common_opts $filtered_add_opts"
|
|
103
|
+
;;
|
|
51
104
|
advance) __gitcomp "$common_opts $advance_opts" ;;
|
|
52
|
-
anno)
|
|
105
|
+
anno)
|
|
106
|
+
local filtered_anno_opts
|
|
107
|
+
filtered_anno_opts=$(_git_machete_filter_mutex_groups "$anno_opts" \
|
|
108
|
+
"-H --sync-github-prs -L --sync-gitlab-mrs")
|
|
109
|
+
__gitcomp "$common_opts $filtered_anno_opts"
|
|
110
|
+
;;
|
|
53
111
|
d|diff) __gitcomp "$common_opts $diff_opts" ;;
|
|
54
112
|
delete-unmanaged) __gitcomp "$common_opts $delete_unmanaged_opts" ;;
|
|
55
113
|
discover) __gitcomp "$common_opts $discover_opts" ;;
|
|
56
|
-
fork-point)
|
|
114
|
+
fork-point)
|
|
115
|
+
local filtered_fork_point_opts
|
|
116
|
+
filtered_fork_point_opts=$(_git_machete_filter_mutex_groups "$fork_point_opts" \
|
|
117
|
+
"--inferred --override-to= --override-to-inferred --override-to-parent --unset-override" \
|
|
118
|
+
"--explain --override-to= --override-to-inferred --override-to-parent --unset-override")
|
|
119
|
+
__gitcomp "$common_opts $filtered_fork_point_opts"
|
|
120
|
+
;;
|
|
57
121
|
github)
|
|
58
122
|
case ${COMP_WORDS[3]} in
|
|
59
123
|
"anno-prs") __gitcomp "$common_opts $githublab_anno_opts" ;;
|
|
@@ -75,11 +139,52 @@ _git_machete() {
|
|
|
75
139
|
*) __gitcomp "$common_opts" ;;
|
|
76
140
|
esac ;;
|
|
77
141
|
reapply) __gitcomp "$common_opts $reapply_opts" ;;
|
|
78
|
-
|
|
142
|
+
rename) __gitcomp "$common_opts $rename_opts" ;;
|
|
143
|
+
slide-out)
|
|
144
|
+
local filtered_slide_out_opts
|
|
145
|
+
filtered_slide_out_opts=$(_git_machete_filter_mutex_groups "$slide_out_opts" \
|
|
146
|
+
"--removed-from-remote -d --down-fork-point=" \
|
|
147
|
+
"--removed-from-remote -M --merge" \
|
|
148
|
+
"--removed-from-remote -n" \
|
|
149
|
+
"--removed-from-remote --no-edit-merge" \
|
|
150
|
+
"--removed-from-remote --no-interactive-rebase" \
|
|
151
|
+
"--removed-from-remote --no-rebase" \
|
|
152
|
+
"-M --merge -d --down-fork-point=" \
|
|
153
|
+
"-M --merge --no-interactive-rebase" \
|
|
154
|
+
"-M --merge --no-rebase" \
|
|
155
|
+
"-n --no-edit-merge" \
|
|
156
|
+
"-n --no-interactive-rebase" \
|
|
157
|
+
"--no-rebase -d --down-fork-point=" \
|
|
158
|
+
"--no-rebase --no-edit-merge" \
|
|
159
|
+
"--no-rebase --no-interactive-rebase")
|
|
160
|
+
__gitcomp "$common_opts $filtered_slide_out_opts"
|
|
161
|
+
;;
|
|
79
162
|
squash) __gitcomp "$common_opts $squash_opts" ;;
|
|
80
163
|
s|status) __gitcomp "$common_opts $status_opts" ;;
|
|
81
|
-
t|traverse)
|
|
82
|
-
|
|
164
|
+
t|traverse)
|
|
165
|
+
local filtered_traverse_opts
|
|
166
|
+
filtered_traverse_opts=$(_git_machete_filter_mutex_groups "$traverse_opts" \
|
|
167
|
+
"-W -F --fetch" \
|
|
168
|
+
"-W -l --list-commits" \
|
|
169
|
+
"-W -w --whole" \
|
|
170
|
+
"-H --sync-github-prs -L --sync-gitlab-mrs" \
|
|
171
|
+
"-M --merge --no-interactive-rebase" \
|
|
172
|
+
"-n --no-edit-merge" \
|
|
173
|
+
"-n --no-interactive-rebase" \
|
|
174
|
+
"-n -y --yes" \
|
|
175
|
+
"--push --no-push" \
|
|
176
|
+
"--push-untracked --no-push-untracked")
|
|
177
|
+
__gitcomp "$common_opts $filtered_traverse_opts"
|
|
178
|
+
;;
|
|
179
|
+
update)
|
|
180
|
+
local filtered_update_opts
|
|
181
|
+
filtered_update_opts=$(_git_machete_filter_mutex_groups "$update_opts" \
|
|
182
|
+
"-M --merge -f --fork-point=" \
|
|
183
|
+
"-M --merge --no-interactive-rebase" \
|
|
184
|
+
"-n --no-edit-merge" \
|
|
185
|
+
"-n --no-interactive-rebase")
|
|
186
|
+
__gitcomp "$common_opts $filtered_update_opts"
|
|
187
|
+
;;
|
|
83
188
|
*)
|
|
84
189
|
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
85
190
|
__gitcomp "$common_opts --version"
|
|
@@ -108,6 +213,7 @@ _git_machete() {
|
|
|
108
213
|
--return-to) __gitcomp "$opt_return_to_args" ;;
|
|
109
214
|
# TODO (#111): complete the comma-separated list of roots
|
|
110
215
|
-r|--roots) __gitcomp "$(__git_heads)" ;;
|
|
216
|
+
--squash-merge-detection) __gitcomp "$opt_squash_merge_detection_args" ;;
|
|
111
217
|
--start-from) __gitcomp "$opt_start_from_args $(__git_heads)" ;;
|
|
112
218
|
--stop-after) __gitcomp "$(__git_heads)" ;;
|
|
113
219
|
--unset-override) __gitcomp_nl "$(git machete list with-overridden-fork-point 2>/dev/null)" ;;
|
|
@@ -19,9 +19,9 @@ _git-machete() {
|
|
|
19
19
|
(add)
|
|
20
20
|
_arguments \
|
|
21
21
|
'1:: :__git_machete_list_addable' \
|
|
22
|
-
'(-f --as-first-child)'{-f,--as-first-child}'[Add the given branch as the first (instead of last) child of its parent]' \
|
|
23
|
-
'(-R --as-root)'{-R,--as-root}'[Add the given branch as a new root]' \
|
|
24
|
-
'(-o --onto)'{-o,--onto=}'[Specify the target parent branch to add the given branch onto]: :__git_machete_list_managed' \
|
|
22
|
+
'(-R --as-root -f --as-first-child)'{-f,--as-first-child}'[Add the given branch as the first (instead of last) child of its parent]' \
|
|
23
|
+
'(-R --as-root -f --as-first-child -o --onto)'{-R,--as-root}'[Add the given branch as a new root]' \
|
|
24
|
+
'(-R --as-root -o --onto)'{-o,--onto=}'[Specify the target parent branch to add the given branch onto]: :__git_machete_list_managed' \
|
|
25
25
|
'(-y --yes)'{-y,--yes}'[Do not ask for confirmation whether to create the branch or whether to add onto the inferred upstream]' \
|
|
26
26
|
"${common_flags[@]}"
|
|
27
27
|
;;
|
|
@@ -33,8 +33,8 @@ _git-machete() {
|
|
|
33
33
|
(anno)
|
|
34
34
|
_arguments \
|
|
35
35
|
'(-b --branch)'{-b,--branch=}'[Branch to set the annotation for]: :__git_machete_list_managed' \
|
|
36
|
-
'(-H --sync-github-prs)'{-H,--sync-github-prs}'[Annotate with GitHub PR numbers and author logins where applicable]' \
|
|
37
|
-
'(-L --sync-gitlab-mrs)'{-L,--sync-gitlab-mrs}'[Annotate with GitLab MR numbers and author logins where applicable]' \
|
|
36
|
+
'(-L --sync-gitlab-mrs -H --sync-github-prs)'{-H,--sync-github-prs}'[Annotate with GitHub PR numbers and author logins where applicable]' \
|
|
37
|
+
'(-H --sync-github-prs -L --sync-gitlab-mrs)'{-L,--sync-gitlab-mrs}'[Annotate with GitLab MR numbers and author logins where applicable]' \
|
|
38
38
|
"${common_flags[@]}"
|
|
39
39
|
;;
|
|
40
40
|
(completion)
|
|
@@ -66,12 +66,13 @@ _git-machete() {
|
|
|
66
66
|
_arguments "${common_flags[@]}"
|
|
67
67
|
;;
|
|
68
68
|
(fork-point)
|
|
69
|
-
_arguments '1:: :
|
|
70
|
-
'(--inferred)'--
|
|
71
|
-
'(--override-to
|
|
72
|
-
'(--override-to-inferred)'--override-to
|
|
73
|
-
'(--override-to-parent)'--override-to-
|
|
74
|
-
'(--unset-override)'--
|
|
69
|
+
_arguments '1:: :__git_machete_fork_point_branch_arg' \
|
|
70
|
+
'(--explain --override-to --override-to-inferred --override-to-parent --unset-override)'--explain'[Also list the branches the fork point was inferred from]' \
|
|
71
|
+
'(--inferred --override-to --override-to-inferred --override-to-parent --unset-override)'--inferred'[Display the fork point ignoring any potential override]' \
|
|
72
|
+
'(--explain --inferred --override-to --override-to-inferred --override-to-parent --unset-override)'--override-to='[Override fork point to the given revision]: :__git_references' \
|
|
73
|
+
'(--explain --inferred --override-to --override-to-inferred --override-to-parent --unset-override)'--override-to-inferred'[Override fork point to the inferred location]' \
|
|
74
|
+
'(--explain --inferred --override-to --override-to-inferred --override-to-parent --unset-override)'--override-to-parent'[Override fork point to the upstream (parent) branch]' \
|
|
75
|
+
'(--explain --inferred --override-to --override-to-inferred --override-to-parent --unset-override)'--unset-override'[Unset fork point override by removing machete.overrideForkPoint.<branch>.* configs]' \
|
|
75
76
|
"${common_flags[@]}"
|
|
76
77
|
;;
|
|
77
78
|
(g|go)
|
|
@@ -105,6 +106,13 @@ _git-machete() {
|
|
|
105
106
|
'(-f --fork-point)'{-f,--fork-point=}'[Fork point commit after which the rebased part of history is meant to start]: :__git_references' \
|
|
106
107
|
"${common_flags[@]}"
|
|
107
108
|
;;
|
|
109
|
+
(rename)
|
|
110
|
+
_arguments \
|
|
111
|
+
'1:: :__git_machete_list_managed' \
|
|
112
|
+
'(-b --branch)'{-b,--branch=}'[Branch to rename; if not given, the current branch is renamed]: :__git_machete_list_managed' \
|
|
113
|
+
'(--repoint-tracking)'--repoint-tracking'[After rename, try to set tracking to <remote>/<new-name>, or unset tracking if that remote branch does not exist]' \
|
|
114
|
+
"${common_flags[@]}"
|
|
115
|
+
;;
|
|
108
116
|
(show)
|
|
109
117
|
_arguments \
|
|
110
118
|
'1:: :__git_machete_directions_show' \
|
|
@@ -115,14 +123,14 @@ _git-machete() {
|
|
|
115
123
|
# TODO (#113): suggest further branches based on the previous specified branch (like in Bash completion script)
|
|
116
124
|
_arguments \
|
|
117
125
|
'*:: :__git_machete_list_slidable' \
|
|
118
|
-
'(-d --down-fork-point)'{-d,--down-fork-point=}'[If updating by rebase, specify fork point commit after which the rebased part of history of the downstream branch is meant to start]: :__git_references' \
|
|
126
|
+
'(--removed-from-remote -M --merge --no-rebase -d --down-fork-point)'{-d,--down-fork-point=}'[If updating by rebase, specify fork point commit after which the rebased part of history of the downstream branch is meant to start]: :__git_references' \
|
|
119
127
|
'(--delete)'--delete'[Delete branches after sliding them out]' \
|
|
120
|
-
'(-M --merge)'{-M,--merge}'[Update by merge rather than by rebase]' \
|
|
121
|
-
'(-n)'-n'[If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge]' \
|
|
122
|
-
'(--no-edit-merge)'--no-edit-merge'[If updating by merge, pass --no-edit flag to underlying git merge]' \
|
|
123
|
-
'(--no-interactive-rebase)'--no-interactive-rebase'[If updating by rebase, do NOT pass --interactive flag to underlying git rebase]' \
|
|
124
|
-
'(--no-rebase)'--no-rebase'[Skip rebase of downstream branches after sliding out]' \
|
|
125
|
-
'(--removed-from-remote)'--removed-from-remote'[Slide out all branches removed from the remote]' \
|
|
128
|
+
'(--removed-from-remote -d --down-fork-point --no-interactive-rebase --no-rebase -M --merge)'{-M,--merge}'[Update by merge rather than by rebase]' \
|
|
129
|
+
'(--removed-from-remote -n --no-edit-merge --no-interactive-rebase)'-n'[If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge]' \
|
|
130
|
+
'(--removed-from-remote -n --no-edit-merge --no-interactive-rebase --no-rebase)'--no-edit-merge'[If updating by merge, pass --no-edit flag to underlying git merge]' \
|
|
131
|
+
'(--removed-from-remote -M --merge -n --no-edit-merge --no-interactive-rebase --no-rebase)'--no-interactive-rebase'[If updating by rebase, do NOT pass --interactive flag to underlying git rebase]' \
|
|
132
|
+
'(--removed-from-remote -d --down-fork-point -M --merge --no-interactive-rebase --no-edit-merge --no-rebase)'--no-rebase'[Skip rebase of downstream branches after sliding out]' \
|
|
133
|
+
'(--removed-from-remote -d --down-fork-point -M --merge -n --no-edit-merge --no-interactive-rebase --no-rebase)'--removed-from-remote'[Slide out all branches removed from the remote]' \
|
|
126
134
|
"${common_flags[@]}"
|
|
127
135
|
;;
|
|
128
136
|
(squash)
|
|
@@ -136,38 +144,40 @@ _git-machete() {
|
|
|
136
144
|
'(-L --list-commits-with-hashes)'{-L,--list-commits-with-hashes}'[List the short hashes and messages of commits introduced on each branch]' \
|
|
137
145
|
'(-l --list-commits)'{-l,--list-commits}'[List the messages of commits introduced on each branch]' \
|
|
138
146
|
'(--no-detect-squash-merges)'--no-detect-squash-merges'[Only consider "strict" (fast-forward or 2-parent) merges, rather than rebase/squash merges, when detecting if a branch is merged into its upstream]' \
|
|
147
|
+
'(--squash-merge-detection)'--squash-merge-detection='[Mode of detection of squash merges; argument can be "none", "simple" or "exact"]: :__git_machete_opt_squash_merge_detection_args' \
|
|
139
148
|
"${common_flags[@]}"
|
|
140
149
|
;;
|
|
141
150
|
(t|traverse)
|
|
142
151
|
_arguments \
|
|
143
|
-
'(-F --fetch)'{-F,--fetch}'[Fetch the remotes of all managed branches at the beginning of traversal]' \
|
|
144
|
-
'(-H --sync-github-prs)'{-H,--sync-github-prs}'[Create and retarget GitHub PRs while traversing]' \
|
|
145
|
-
'(-L --sync-gitlab-mrs)'{-L,--sync-gitlab-mrs}'[Create and retarget GitLab MRs while traversing]' \
|
|
146
|
-
'(-l --list-commits)'{-l,--list-commits}'[List the messages of commits introduced on each branch]' \
|
|
147
|
-
'(-M --merge)'{-M,--merge}'[Update by merge rather than by rebase]' \
|
|
148
|
-
'(-n)'-n'[If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge]' \
|
|
152
|
+
'(-W -F --fetch)'{-F,--fetch}'[Fetch the remotes of all managed branches at the beginning of traversal]' \
|
|
153
|
+
'(-L --sync-gitlab-mrs -H --sync-github-prs)'{-H,--sync-github-prs}'[Create and retarget GitHub PRs while traversing]' \
|
|
154
|
+
'(-H --sync-github-prs -L --sync-gitlab-mrs)'{-L,--sync-gitlab-mrs}'[Create and retarget GitLab MRs while traversing]' \
|
|
155
|
+
'(-W -l --list-commits)'{-l,--list-commits}'[List the messages of commits introduced on each branch]' \
|
|
156
|
+
'(--no-interactive-rebase -M --merge)'{-M,--merge}'[Update by merge rather than by rebase]' \
|
|
157
|
+
'(-n --no-edit-merge --no-interactive-rebase -y --yes)'-n'[If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge]' \
|
|
149
158
|
'(--no-detect-squash-merges)'--no-detect-squash-merges'[Only consider "strict" (fast-forward or 2-parent) merges, rather than rebase/squash merges, when detecting if a branch is merged into its upstream]' \
|
|
150
|
-
'(--no-edit-merge)'--no-edit-merge'[If updating by merge, pass --no-edit flag to underlying git merge]' \
|
|
151
|
-
'(--no-interactive-rebase)'--no-interactive-rebase'[If updating by rebase, do NOT pass --interactive flag to underlying git rebase]' \
|
|
152
|
-
'(--no-push)'--no-push'[Do not push any (neither tracked nor untracked) branches to remote]' \
|
|
153
|
-
'(--no-push-untracked)'--no-push-untracked'[Do not push untracked branches to remote]' \
|
|
154
|
-
'(--push)'--push'[Push all (both tracked and untracked) branches to remote (default behavior)]' \
|
|
155
|
-
'(--push-untracked)'--push-untracked'[Push untracked branches to remote (default behavior)]' \
|
|
159
|
+
'(-n --no-edit-merge)'--no-edit-merge'[If updating by merge, pass --no-edit flag to underlying git merge]' \
|
|
160
|
+
'(-n -M --merge --no-interactive-rebase)'--no-interactive-rebase'[If updating by rebase, do NOT pass --interactive flag to underlying git rebase]' \
|
|
161
|
+
'(--push --no-push)'--no-push'[Do not push any (neither tracked nor untracked) branches to remote]' \
|
|
162
|
+
'(--push-untracked --no-push-untracked)'--no-push-untracked'[Do not push untracked branches to remote]' \
|
|
163
|
+
'(--no-push --push)'--push'[Push all (both tracked and untracked) branches to remote (default behavior)]' \
|
|
164
|
+
'(--no-push-untracked --push-untracked)'--push-untracked'[Push untracked branches to remote (default behavior)]' \
|
|
156
165
|
'(--return-to)'--return-to='[The branch to return after traversal is successfully completed; argument can be "here", "nearest-remaining", or "stay"]: :__git_machete_opt_return_to_args' \
|
|
166
|
+
'(--squash-merge-detection)'--squash-merge-detection='[Mode of detection of squash merges; argument can be "none", "simple" or "exact"]: :__git_machete_opt_squash_merge_detection_args' \
|
|
157
167
|
'(--start-from)'--start-from='[The branch to start the traversal from; argument can be "here", "root", "first-root", or any branch name]: :__git_machete_opt_start_from_args_or_branches' \
|
|
158
168
|
'(--stop-after)'--stop-after='[The branch to stop the traversal after]: :__git_branch_names' \
|
|
159
|
-
'(-w --whole)'{-w,--whole}'[Equivalent to -n --start-from=first-root --return-to=nearest-remaining]' \
|
|
160
|
-
'(-W)'-W'[Equivalent to --fetch --whole]' \
|
|
161
|
-
'(-y --yes)'{-y,--yes}'[Do not ask for any interactive input; implicates -n]' \
|
|
169
|
+
'(-W -w --whole)'{-w,--whole}'[Equivalent to -n --start-from=first-root --return-to=nearest-remaining]' \
|
|
170
|
+
'(-F --fetch -l --list-commits -w --whole -W)'-W'[Equivalent to --fetch --whole]' \
|
|
171
|
+
'(-n -y --yes)'{-y,--yes}'[Do not ask for any interactive input; implicates -n]' \
|
|
162
172
|
"${common_flags[@]}"
|
|
163
173
|
;;
|
|
164
174
|
(update)
|
|
165
175
|
_arguments \
|
|
166
|
-
'(-f --fork-point)'{-f,--fork-point=}'[If updating by rebase, specify fork point commit after which the rebased part of history is meant to start]: :__git_references' \
|
|
167
|
-
'(-M --merge)'{-M,--merge}'[Update by merge rather than by rebase]' \
|
|
168
|
-
'(-n)'-n'[If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge]' \
|
|
169
|
-
'(--no-edit-merge)'--no-edit-merge'[If updating by merge, pass --no-edit flag to underlying git merge]' \
|
|
170
|
-
'(--no-interactive-rebase)'--no-interactive-rebase'[If updating by rebase, do NOT pass --interactive flag to underlying git rebase]' \
|
|
176
|
+
'(-M --merge -f --fork-point)'{-f,--fork-point=}'[If updating by rebase, specify fork point commit after which the rebased part of history is meant to start]: :__git_references' \
|
|
177
|
+
'(-f --fork-point --no-interactive-rebase -M --merge)'{-M,--merge}'[Update by merge rather than by rebase]' \
|
|
178
|
+
'(-n --no-edit-merge --no-interactive-rebase)'-n'[If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge]' \
|
|
179
|
+
'(-n --no-edit-merge)'--no-edit-merge'[If updating by merge, pass --no-edit flag to underlying git merge]' \
|
|
180
|
+
'(-n -M --merge --no-interactive-rebase)'--no-interactive-rebase'[If updating by rebase, do NOT pass --interactive flag to underlying git rebase]' \
|
|
171
181
|
"${common_flags[@]}"
|
|
172
182
|
;;
|
|
173
183
|
esac
|
|
@@ -193,6 +203,7 @@ __git_machete_cmds=(
|
|
|
193
203
|
'list:List all branches that fall into one of pre-defined categories (mostly for internal use)'
|
|
194
204
|
'log:Log the part of history specific to the given branch'
|
|
195
205
|
'reapply:Rebase the current branch onto its own fork point'
|
|
206
|
+
'rename:Rename a branch both in git and in the branch layout file'
|
|
196
207
|
'show:Show name(s) of the branch(es) relative to the position of the current branch'
|
|
197
208
|
'slide-out:Slide the current branch out and sync its downstream (child) branch with its upstream (parent) branch via rebase or merge'
|
|
198
209
|
'squash:Squash the unique history of the current branch into a single commit'
|
|
@@ -427,6 +438,16 @@ __git_machete_opt_return_to_args() {
|
|
|
427
438
|
_describe 'return-to argument' opt_return_to
|
|
428
439
|
}
|
|
429
440
|
|
|
441
|
+
__git_machete_opt_squash_merge_detection_args() {
|
|
442
|
+
local opt_squash_merge_detection
|
|
443
|
+
opt_squash_merge_detection=(
|
|
444
|
+
'none:disable squash merge detection entirely'
|
|
445
|
+
'simple:the default - detect squashes by checking if the merge base of the branch and its upstream matches the branch'
|
|
446
|
+
'exact:detect squashes by checking if there is a commit on the upstream whose tree matches that of the branch tip'
|
|
447
|
+
)
|
|
448
|
+
_describe 'squash-merge-detection argument' opt_squash_merge_detection
|
|
449
|
+
}
|
|
450
|
+
|
|
430
451
|
__git_machete_opt_start_from_args() {
|
|
431
452
|
local opt_start_from
|
|
432
453
|
opt_start_from=(
|
|
@@ -465,6 +486,17 @@ __git_machete_list_with_overridden_fork_point() {
|
|
|
465
486
|
_describe 'branch with overridden fork point' result
|
|
466
487
|
}
|
|
467
488
|
|
|
489
|
+
# Positional <branch> for `git machete fork-point`: when --unset-override is on the
|
|
490
|
+
# command line, the branch must be one whose fork-point override is being unset
|
|
491
|
+
# (i.e. one currently with an override); otherwise any local branch is allowed.
|
|
492
|
+
__git_machete_fork_point_branch_arg() {
|
|
493
|
+
if (( ${words[(I)--unset-override]} )); then
|
|
494
|
+
__git_machete_list_with_overridden_fork_point
|
|
495
|
+
else
|
|
496
|
+
__git_branch_names
|
|
497
|
+
fi
|
|
498
|
+
}
|
|
499
|
+
|
|
468
500
|
__git_machete_completion_shells() {
|
|
469
501
|
local shells
|
|
470
502
|
shells=(bash fish zsh)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
set -l __machete_help_topics config format hooks
|
|
4
4
|
set -l __machete_commands_long add advance anno completion delete-unmanaged diff discover edit file fork-point \
|
|
5
|
-
github gitlab go help is-managed list log reapply show slide-out squash status traverse update version
|
|
5
|
+
github gitlab go help is-managed list log reapply rename show slide-out squash status traverse update version
|
|
6
6
|
set -l __machete_commands_short d e g l s t
|
|
7
7
|
set -l __machete_commands $__machete_commands_long $__machete_commands_short
|
|
8
8
|
|
|
@@ -82,15 +82,22 @@ complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands"
|
|
|
82
82
|
# git machete fork-point
|
|
83
83
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a fork-point -d 'Display or override fork point for a branch'
|
|
84
84
|
# all forms
|
|
85
|
+
# When --unset-override is on the command line, the positional <branch> argument is
|
|
86
|
+
# specifically a branch with an active fork-point override; otherwise any local branch.
|
|
85
87
|
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --unset-override" -f -a '(__fish_git_local_branches)'
|
|
88
|
+
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and __fish_seen_subcommand_from --unset-override" -f -a '(__machete_with_overridden_fork_point_branches)'
|
|
86
89
|
# form 1
|
|
87
90
|
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --inferred --unset-override --override-to --override-to-inferred --override-to-parent" -f -l inferred
|
|
91
|
+
# --explain may be combined with --inferred but not with the override-* / --unset-override flags
|
|
92
|
+
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --explain --unset-override --override-to --override-to-inferred --override-to-parent" -f -l explain
|
|
88
93
|
# form 2
|
|
89
|
-
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --inferred --unset-override --override-to-inferred --override-to-parent" -x -l override-to -a '(__fish_git_refs)'
|
|
90
|
-
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --inferred --unset-override --override-to --override-to-inferred --override-to-parent" -f -l override-to-inferred
|
|
91
|
-
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --inferred --unset-override --override-to --override-to-inferred --override-to-parent" -f -l override-to-parent
|
|
94
|
+
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --explain --inferred --unset-override --override-to-inferred --override-to-parent" -x -l override-to -a '(__fish_git_refs)'
|
|
95
|
+
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --explain --inferred --unset-override --override-to --override-to-inferred --override-to-parent" -f -l override-to-inferred
|
|
96
|
+
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --explain --inferred --unset-override --override-to --override-to-inferred --override-to-parent" -f -l override-to-parent
|
|
92
97
|
# form 3
|
|
93
|
-
|
|
98
|
+
# --unset-override is a boolean flag; the positional <branch> (handled above) is the
|
|
99
|
+
# branch whose override gets unset, hence no -x and no value completer here.
|
|
100
|
+
complete -c git-machete -n "__fish_seen_subcommand_from fork-point; and not __fish_seen_subcommand_from --explain --inferred --override-to --override-to-inferred --override-to-parent" -f -l unset-override
|
|
94
101
|
|
|
95
102
|
# git machete github
|
|
96
103
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a github -d 'Create, check out and manage GitHub PRs while keeping them reflected in git machete'
|
|
@@ -119,12 +126,12 @@ complete -c git-machete -n "__fish_seen_subcommand_from github; and __fish_seen_
|
|
|
119
126
|
|
|
120
127
|
# git machete gitlab
|
|
121
128
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a gitlab -d 'Create, check out and manage GitLab MRs while keeping them reflected in git machete'
|
|
122
|
-
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr
|
|
123
|
-
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr
|
|
124
|
-
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr
|
|
125
|
-
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr
|
|
126
|
-
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr
|
|
127
|
-
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr
|
|
129
|
+
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr update-mr-descriptions" -f -a anno-mrs -d 'Annotate the branches based on their corresponding GitLab MR numbers and authors'
|
|
130
|
+
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr update-mr-descriptions" -x -a checkout-mrs -d 'Check out the head branch of the given merge requests (specified by number), also traverse chain of merge requests upwards, adding branches one by one to git-machete and check them out locally'
|
|
131
|
+
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr update-mr-descriptions" -f -a create-mr -d 'Create an MR for the current branch, using the upstream (parent) branch as the MR source branch'
|
|
132
|
+
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr update-mr-descriptions" -f -a restack-mr -d '(Force-)push and retarget the MR, without adding code owners as reviewers in the process'
|
|
133
|
+
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr update-mr-descriptions" -f -a retarget-mr -d 'Set the base of MR for the current branch to upstream (parent) branch, as seen by git machete (see git machete show up)'
|
|
134
|
+
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and not __fish_seen_subcommand_from anno-mrs checkout-mrs create-mr restack-mr retarget-mr update-mr-descriptions" -f -a update-mr-descriptions -d 'Update the generated sections of MR descriptions that list the upstream and/or downstream MRs'
|
|
128
135
|
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from anno-mrs; and not __fish_seen_subcommand_from --with-urls" -f -l with-urls -d 'Include MR URLs in the annotations'
|
|
129
136
|
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from checkout-mrs; and not __fish_seen_subcommand_from --all" -f -l all -d 'Checkout all open MRs'
|
|
130
137
|
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from checkout-mrs; and not __fish_seen_subcommand_from --by" -x -l by -d "Checkout someone's open MRs"
|
|
@@ -139,7 +146,7 @@ complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_
|
|
|
139
146
|
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from retarget-mr; and not __fish_seen_subcommand_from --update-related-descriptions" -f -l update-related-descriptions -s U -d 'Update the generated sections of MR descriptions that list the upstream and/or downstream MRs'
|
|
140
147
|
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from update-mr-descriptions; and not __fish_seen_subcommand_from --all" -f -l all -d 'Update MR descriptions for all MRs in the project'
|
|
141
148
|
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from update-mr-descriptions; and not __fish_seen_subcommand_from --by" -f -l by -d 'Update MR descriptions for all MRs opened by the given user'
|
|
142
|
-
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from update-mr-descriptions; and not __fish_seen_subcommand_from --mine" -f -l mine -d 'Update MR descriptions for all MRs opened by the current user associated with the
|
|
149
|
+
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from update-mr-descriptions; and not __fish_seen_subcommand_from --mine" -f -l mine -d 'Update MR descriptions for all MRs opened by the current user associated with the GitLab token'
|
|
143
150
|
complete -c git-machete -n "__fish_seen_subcommand_from gitlab; and __fish_seen_subcommand_from update-mr-descriptions; and not __fish_seen_subcommand_from --related" -f -l related -d 'Update MR descriptions for all MRs that are upstream and/or downstream of the MR for the current branch'
|
|
144
151
|
|
|
145
152
|
# git machete go
|
|
@@ -180,6 +187,11 @@ complete -c git-machete -n "__fish_seen_subcommand_from log l"
|
|
|
180
187
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a reapply -d 'Rebase the current branch onto its computed fork point'
|
|
181
188
|
complete -c git-machete -n "__fish_seen_subcommand_from reapply" -x -l fork-point -s f -a '(__fish_git_refs)' -d 'Specifies the alternative fork point commit after which the rebased part of history is meant to start'
|
|
182
189
|
|
|
190
|
+
# git machete rename
|
|
191
|
+
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a rename -d 'Rename a branch both in git and in the branch layout file'
|
|
192
|
+
complete -c git-machete -n "__fish_seen_subcommand_from rename" -x -l branch -s b -a '(__machete_managed_branches)' -d 'Branch to rename; if not given, the current branch is renamed'
|
|
193
|
+
complete -c git-machete -n "__fish_seen_subcommand_from rename; and not __fish_seen_subcommand_from --repoint-tracking" -f -l repoint-tracking -d 'After rename, try to set tracking to <remote>/<new-name>, or unset if that remote branch does not exist'
|
|
194
|
+
|
|
183
195
|
# git machete show
|
|
184
196
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a show -d 'Show name(s) of the branch(es) relative to the position of a branch, accepts down/first/last/next/root/prev/up argument'
|
|
185
197
|
complete -c git-machete -n "__fish_seen_subcommand_from show; and not __fish_seen_subcommand_from current c down d first f last l next n prev p root r up u" -f -a current -d 'the current branch; exits with a non-zero status if none (detached HEAD)'
|
|
@@ -194,14 +206,14 @@ complete -c git-machete -n "__fish_seen_subcommand_from show; and not __fish_see
|
|
|
194
206
|
# git machete slide-out
|
|
195
207
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a slide-out -d 'Slide out the current branch and sync its downstream (child) branches with its upstream (parent) branch via rebase or merge'
|
|
196
208
|
complete -c git-machete -n "__fish_seen_subcommand_from slide-out" -f -a '(__machete_slidable_branches)'
|
|
197
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote"
|
|
198
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote --merge -M"
|
|
199
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --delete"
|
|
200
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote --merge -M --down-fork-point -d"
|
|
201
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -n --no-edit-merge --no-interactive-rebase"
|
|
202
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -n --no-edit-merge --no-interactive-rebase"
|
|
203
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -M --merge -n --no-edit-merge --no-interactive-rebase"
|
|
204
|
-
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -d --down-fork-point -
|
|
209
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -d --down-fork-point -M --merge -n --no-edit-merge --no-interactive-rebase --no-rebase" -f -l removed-from-remote -d 'Slide out all branches removed from the remote'
|
|
210
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote --merge -M --no-rebase" -x -l down-fork-point -s d -a '(__fish_git_refs)' -d 'If updating by rebase, specifies the alternative fork point for downstream branches for the operation. Not allowed if updating by merge'
|
|
211
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --delete" -f -l delete -d 'Delete branches after sliding them out'
|
|
212
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote --merge -M --down-fork-point -d --no-rebase" -f -l merge -s M -d 'Update the downstream branch by merge rather than by rebase'
|
|
213
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -n --no-edit-merge --no-interactive-rebase" -f -s n -d 'If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge'
|
|
214
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -n --no-edit-merge --no-interactive-rebase --no-rebase" -f -l no-edit-merge -d 'If updating by merge, skip opening the editor for merge commit message while doing git merge (i.e. pass --no-edit flag to underlying git merge). Not allowed if updating by rebase'
|
|
215
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -M --merge -n --no-edit-merge --no-interactive-rebase --no-rebase" -f -l no-interactive-rebase -d 'If updating by rebase, run git rebase in non-interactive mode (without -i/--interactive flag). Not allowed if updating by merge'
|
|
216
|
+
complete -c git-machete -n "__fish_seen_subcommand_from slide-out; and not __fish_seen_subcommand_from --removed-from-remote -d --down-fork-point -M --merge --no-edit-merge --no-interactive-rebase --no-rebase" -f -l no-rebase -d 'Skip rebase of downstream branches after sliding out'
|
|
205
217
|
|
|
206
218
|
# git machete squash
|
|
207
219
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a squash -d 'Squash the unique history of the current branch into a single commit'
|
|
@@ -213,28 +225,30 @@ complete -c git-machete -n "__fish_seen_subcommand_from status s"
|
|
|
213
225
|
complete -c git-machete -n "__fish_seen_subcommand_from status s; and not __fish_seen_subcommand_from --list-commits -l" -f -l list-commits -s l -d 'Additionally list the commits introduced on each branch'
|
|
214
226
|
complete -c git-machete -n "__fish_seen_subcommand_from status s; and not __fish_seen_subcommand_from --list-commits-with-hashes -L" -f -l list-commits-with-hashes -s L -d 'Additionally list the short hashes and messages of commits introduced on each branch'
|
|
215
227
|
complete -c git-machete -n "__fish_seen_subcommand_from status s; and not __fish_seen_subcommand_from --no-detect-squash-merges" -f -l no-detect-squash-merges -d 'Only consider "strict" (fast-forward or 2-parent) merges, rather than rebase/squash merges, when detecting if a branch is merged into its upstream (parent)'
|
|
228
|
+
complete -c git-machete -n "__fish_seen_subcommand_from status s" -x -l squash-merge-detection -a 'none simple exact' -d 'Mode of detection of squash merges; argument can be "none", "simple" (default) or "exact"'
|
|
216
229
|
|
|
217
230
|
# git machete traverse
|
|
218
231
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a traverse -d 'Walk through the tree of branch dependencies and rebase, merge, slide out, push and/or pull each branch one by one'
|
|
219
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --fetch -F"
|
|
220
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --list-commits -l"
|
|
221
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --sync-gitlab-mrs"
|
|
222
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --sync-github-prs"
|
|
223
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --merge -M"
|
|
224
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --yes -y"
|
|
225
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-detect-squash-merges"
|
|
226
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-edit-merge"
|
|
227
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-interactive-rebase"
|
|
228
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-push"
|
|
229
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-push-untracked"
|
|
230
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --push"
|
|
231
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --push-untracked"
|
|
232
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t"
|
|
233
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t"
|
|
234
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t"
|
|
235
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t
|
|
236
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from -W"
|
|
237
|
-
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --
|
|
232
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --fetch -F -W" -f -l fetch -s F -d 'Fetch the remotes of all managed branches at the beginning of traversal (no git pull involved, only git fetch)'
|
|
233
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --list-commits -l -W" -f -l list-commits -s l -d 'When printing the status, additionally list the messages of commits introduced on each branch'
|
|
234
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --sync-github-prs -H --sync-gitlab-mrs -L" -f -l sync-github-prs -s H -d 'Create and retarget GitHub PRs while traversing'
|
|
235
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --sync-gitlab-mrs -L --sync-github-prs -H" -f -l sync-gitlab-mrs -s L -d 'Create and retarget GitLab MRs while traversing'
|
|
236
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --merge -M --no-interactive-rebase" -f -l merge -s M -d 'Update by merge rather than by rebase'
|
|
237
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from -n --no-edit-merge --no-interactive-rebase --yes -y" -f -s n -d 'If updating by rebase, equivalent to --no-interactive-rebase. If updating by merge, equivalent to --no-edit-merge'
|
|
238
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-detect-squash-merges" -f -l no-detect-squash-merges -d 'Only consider "strict" (fast-forward or 2-parent) merges, rather than rebase/squash merges, when detecting if a branch is merged into its upstream (parent)'
|
|
239
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-edit-merge -n" -f -l no-edit-merge -d 'If updating by merge, skip opening the editor for merge commit message while doing git merge (i.e. pass --no-edit flag to underlying git merge). Not allowed if updating by rebase'
|
|
240
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-interactive-rebase -n --merge -M" -f -l no-interactive-rebase -d 'If updating by rebase, run git rebase in non-interactive mode (without -i/--interactive flag). Not allowed if updating by merge'
|
|
241
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-push --push" -f -l no-push -d 'Do not push any (neither tracked nor untracked) branches to remote, re-enable via --push'
|
|
242
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --no-push-untracked --push-untracked" -f -l no-push-untracked -d 'Do not push untracked branches to remote, re-enable via --push-untracked'
|
|
243
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --push --no-push" -f -l push -d 'Push all (both tracked and untracked) branches to remote - default behavior'
|
|
244
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --push-untracked --no-push-untracked" -f -l push-untracked -d 'Push untracked branches to remote - default behavior'
|
|
245
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t" -x -l return-to -a 'STAY HERE NEAREST-REMAINING' -d 'Specifies the branch to return after traversal is successfully completed'
|
|
246
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t" -x -l squash-merge-detection -a 'none simple exact' -d 'Mode of detection of squash merges; argument can be "none", "simple" (default) or "exact"'
|
|
247
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t" -x -l start-from -a 'HERE ROOT FIRST-ROOT (__fish_git_local_branches)' -d 'Specifies the branch to start the traversal from'
|
|
248
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t" -x -l stop-after -a '(__fish_git_local_branches)' -d 'Specifies the branch to stop the traversal after'
|
|
249
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --whole -w -W" -f -l whole -s w -d 'Equivalent to -n --start-from=first-root --return-to=nearest-remaining'
|
|
250
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from -W --fetch -F --list-commits -l --whole -w" -f -s W -d 'Equivalent to --fetch --whole; useful for even more automated traversal of all branches'
|
|
251
|
+
complete -c git-machete -n "__fish_seen_subcommand_from traverse t; and not __fish_seen_subcommand_from --yes -y -n" -f -l yes -s y -d 'Do not ask for any interactive input, including confirmation of rebase/push/pull. Implies -n'
|
|
238
252
|
|
|
239
253
|
# git machete update
|
|
240
254
|
complete -c git-machete -n "not __fish_seen_subcommand_from $__machete_commands" -f -a update -d 'Sync the current branch with its upstream (parent) branch via rebase or merge'
|