diff options
| -rw-r--r-- | subcmds/rebase.py | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/subcmds/rebase.py b/subcmds/rebase.py index 9d4b1672..9bc4460c 100644 --- a/subcmds/rebase.py +++ b/subcmds/rebase.py | |||
| @@ -73,6 +73,21 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 73 | file=sys.stderr) | 73 | file=sys.stderr) |
| 74 | return 1 | 74 | return 1 |
| 75 | 75 | ||
| 76 | # Setup the common git rebase args that we use for all projects. | ||
| 77 | common_args = ['rebase'] | ||
| 78 | if opt.whitespace: | ||
| 79 | common_args.append('--whitespace=%s' % opt.whitespace) | ||
| 80 | if opt.quiet: | ||
| 81 | common_args.append('--quiet') | ||
| 82 | if opt.force_rebase: | ||
| 83 | common_args.append('--force-rebase') | ||
| 84 | if opt.no_ff: | ||
| 85 | common_args.append('--no-ff') | ||
| 86 | if opt.autosquash: | ||
| 87 | common_args.append('--autosquash') | ||
| 88 | if opt.interactive: | ||
| 89 | common_args.append('-i') | ||
| 90 | |||
| 76 | for project in all_projects: | 91 | for project in all_projects: |
| 77 | cb = project.CurrentBranch | 92 | cb = project.CurrentBranch |
| 78 | if not cb: | 93 | if not cb: |
| @@ -92,26 +107,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 92 | # ignore branches without remotes | 107 | # ignore branches without remotes |
| 93 | continue | 108 | continue |
| 94 | 109 | ||
| 95 | args = ["rebase"] | 110 | args = common_args[:] |
| 96 | |||
| 97 | if opt.whitespace: | ||
| 98 | args.append('--whitespace=%s' % opt.whitespace) | ||
| 99 | |||
| 100 | if opt.quiet: | ||
| 101 | args.append('--quiet') | ||
| 102 | |||
| 103 | if opt.force_rebase: | ||
| 104 | args.append('--force-rebase') | ||
| 105 | |||
| 106 | if opt.no_ff: | ||
| 107 | args.append('--no-ff') | ||
| 108 | |||
| 109 | if opt.autosquash: | ||
| 110 | args.append('--autosquash') | ||
| 111 | |||
| 112 | if opt.interactive: | ||
| 113 | args.append("-i") | ||
| 114 | |||
| 115 | if opt.onto_manifest: | 111 | if opt.onto_manifest: |
| 116 | args.append('--onto') | 112 | args.append('--onto') |
| 117 | args.append(project.revisionExpr) | 113 | args.append(project.revisionExpr) |
