@@ -58,7 +58,7 @@ Options:
58
58
h Show the command summary
59
59
help Help overview
60
60
version Print the git-subrepo version number
61
-
61
+
62
62
a,all Perform command on all current subrepos
63
63
A,ALL Perform command on all subrepos and subsubrepos
64
64
b,branch= Specify the upstream branch to push/pull/fetch
@@ -68,11 +68,10 @@ F,fetch Fetch the upstream content first
68
68
M,method= Method when you join, valid options are 'merge' or 'rebase'
69
69
Default is 'merge'
70
70
m,message= Specify a commit message
71
- N,dry-run Don't push or commit (prints next commands to run)
72
71
r,remote= Specify the upstream remote to push/pull/fetch
73
72
s,squash Squash commits on push
74
73
u,update Add the --branch and/or --remote overrides to .gitrepo
75
-
74
+
76
75
q,quiet Show minimal output
77
76
v,verbose Show verbose output
78
77
d,debug Show the actual commands used
@@ -91,7 +90,6 @@ main() {
91
90
92
91
local all_wanted=false # Apply command to all subrepos
93
92
local ALL_wanted=false # Apply command to all subrepos and subsubrepos
94
- local dry_run_wanted=false # Skip commits and pushes
95
93
local force_wanted=false # Force certain operations
96
94
local fetch_wanted=false # Fetch requested before a command
97
95
local squash_wanted=false # Squash commits on push
@@ -275,6 +273,8 @@ command:branch() {
275
273
276
274
local branch=" subrepo/$subref "
277
275
if $force_wanted ; then
276
+ # We must make sure that the worktree is removed as well
277
+ worktree=" $GIT_TMP /$branch "
278
278
git:delete-branch " $branch "
279
279
fi
280
280
@@ -1007,7 +1007,6 @@ get-command-options() {
1007
1007
shift ;;
1008
1008
-M) join_method=" $1 "
1009
1009
shift ;;
1010
- -N) dry_run_wanted=true ;;
1011
1010
-r) subrepo_remote=" $1 "
1012
1011
override_remote=" $1 "
1013
1012
commit_msg_args+=(" --remote=$1 " )
@@ -1041,7 +1040,7 @@ get-command-options() {
1041
1040
fi
1042
1041
commit_msg_args+=(" ${command_arguments[@]} " )
1043
1042
1044
- for option in all ALL dry_run edit fetch force squash; do
1043
+ for option in all ALL edit fetch force squash; do
1045
1044
var=" ${option} _wanted"
1046
1045
if ${! var} ; then
1047
1046
check_option $option
@@ -1074,7 +1073,7 @@ options_commit='edit fetch force message'
1074
1073
options_fetch=' all branch remote'
1075
1074
options_init=' branch remote method'
1076
1075
options_pull=' all branch edit force message remote update'
1077
- options_push=' all branch dry_run force remote squash update'
1076
+ options_push=' all branch force remote squash update'
1078
1077
options_status=' ALL all fetch'
1079
1078
check_option () {
1080
1079
local var=" options_${command// -/ _} "
@@ -1754,7 +1753,7 @@ git:remove-worktree() {
1754
1753
1755
1754
git:delete-branch () {
1756
1755
local branch=" $1 "
1757
- o " Deleting old '$branch_name ' branch."
1756
+ o " Deleting old '$branch ' branch."
1758
1757
# Remove worktree first, otherwise you can't delete the branch
1759
1758
git:remove-worktree
1760
1759
FAIL=false RUN git branch -D " $branch "
0 commit comments