Skip to content

Commit 94e3016

Browse files
committed
Add support for --force in pull
The documentation described how --force should work in pull, but it was not implemented. This caused subrepo to display error messages that did not work when changing branches that deviated and an ancestory could not be cleaning tracked. Fix #336
1 parent 983c864 commit 94e3016

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/git-subrepo

+6
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,12 @@ subrepo:init() {
524524
subrepo:pull() {
525525
CALL subrepo:fetch
526526

527+
# If forced pull, then clone instead
528+
if $force_wanted; then
529+
CALL subrepo:clone
530+
return
531+
fi
532+
527533
# Check if we already are up to date
528534
# If the -u flag is present, always perform the operation
529535
if [[ $upstream_head_commit == $subrepo_commit ]] && ! $update_wanted; then

0 commit comments

Comments
 (0)