File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ git subrepo <command> <arguments> <options>
37
37
Commands:
38
38
clone Clone a remote repository into a local subdirectory
39
39
init Turn a current subdirectory into a subrepo
40
+ reset Reset subrepo performing a forced reclone
40
41
pull Pull upstream changes to the subrepo
41
42
push Push local subrepo changes upstream
42
43
@@ -178,6 +179,16 @@ main() {
178
179
# info to the user.
179
180
# ------------------------------------------------------------------------------
180
181
182
+ command:reset () {
183
+ command-setup +subdir
184
+
185
+ local reclone_up_to_date=false
186
+ force_wanted=true
187
+ subrepo:clone
188
+
189
+ say " Subrepo '$subdir ' reset to '$subrepo_remote ' ($subrepo_branch )."
190
+ }
191
+
181
192
# `git subrepo clone <url> [<subdir>]` command:
182
193
command:clone () {
183
194
command-setup +subrepo_remote subdir:guess-subdir
@@ -1077,6 +1088,7 @@ get-command-options() {
1077
1088
}
1078
1089
1079
1090
options_help=' all'
1091
+ options_reset=' branch remote'
1080
1092
options_branch=' all fetch force'
1081
1093
options_clean=' ALL all force'
1082
1094
options_clone=' branch edit force message method'
You can’t perform that action at this time.
0 commit comments