@@ -64,7 +64,7 @@ Options:
64
64
h Show the command summary
65
65
help Help overview
66
66
version Print the git-subrepo version number
67
-
67
+
68
68
a,all Perform command on all current subrepos
69
69
A,ALL Perform command on all subrepos and subsubrepos
70
70
b,branch= Specify the upstream branch to push/pull/fetch
@@ -76,7 +76,7 @@ m,message= Specify a commit message
76
76
r,remote= Specify the upstream remote to push/pull/fetch
77
77
s,squash Squash commits on push
78
78
u,update Add the --branch and/or --remote overrides to .gitrepo
79
-
79
+
80
80
q,quiet Show minimal output
81
81
v,verbose Show verbose output
82
82
d,debug Show the actual commands used
@@ -1399,14 +1399,16 @@ update-gitrepo-file() {
1399
1399
fi
1400
1400
fi
1401
1401
1402
-
1403
- # TODO: only update remote and branch if supplied and $update_wanted
1404
- if $newfile || [[ $update_wanted && $override_remote ]]; then
1405
- RUN git config --file=" $gitrepo " subrepo.remote " $subrepo_remote "
1406
- fi
1407
-
1408
- if $newfile || [[ $update_wanted && $override_branch ]]; then
1409
- RUN git config --file=" $gitrepo " subrepo.branch " $subrepo_branch "
1402
+ # only update remote and branch if supplied and $update_wanted
1403
+ if $newfile || $update_wanted ; then
1404
+ if [[ $override_remote ]]; then
1405
+ o " Update remote to $subrepo_remote "
1406
+ RUN git config --file=" $gitrepo " subrepo.remote " $subrepo_remote "
1407
+ fi
1408
+ if [[ $override_branch ]]; then
1409
+ o " Update branch to $subrepo_branch "
1410
+ RUN git config --file=" $gitrepo " subrepo.branch " $subrepo_branch "
1411
+ fi
1410
1412
fi
1411
1413
1412
1414
RUN git config --file=" $gitrepo " subrepo.commit " $upstream_head_commit "
0 commit comments