File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -180,12 +180,15 @@ main() {
180
180
# ------------------------------------------------------------------------------
181
181
182
182
command:reset () {
183
- command-setup +subdir
183
+ command-setup +subdir forced_commit
184
184
185
185
local reclone_up_to_date=false
186
- force_wanted=true
187
- subrepo:clone
186
+ local force_wanted=true
187
+ if [ -n " $forced_commit " ]; then
188
+ forced_commit=" $( git rev-parse " $forced_commit " ) "
189
+ fi
188
190
191
+ subrepo:clone
189
192
say " Subrepo '$subdir ' reset to '$subrepo_remote ' ($subrepo_branch )."
190
193
}
191
194
@@ -481,6 +484,9 @@ subrepo:clone() {
481
484
if $force_wanted ; then
482
485
o " --force indicates a reclone."
483
486
CALL subrepo:fetch
487
+ if [ -n " $forced_commit " ]; then
488
+ upstream_head_commit=$forced_commit
489
+ fi
484
490
read-gitrepo-file
485
491
o " Check if we already are up to date."
486
492
if [[ $upstream_head_commit == $subrepo_commit ]]; then
You can’t perform that action at this time.
0 commit comments