blob: d0056484f2255f93c6bcb0d5c800ea251ceb4ae5 [file] [log] [blame]
Benedikt Böhm00ccea62010-01-26 12:39:36 +01001#
Vincent Driessen6c2d30b2010-01-26 22:18:36 +01002# git-flow -- A collection of Git extensions to provide high-level
3# repository operations for Vincent Driessen's branching model.
Benedikt Böhm00ccea62010-01-26 12:39:36 +01004#
5# Original blog post presenting this model is found at:
6# http://nvie.com/archives/323
7#
8# Feel free to contribute to this project at:
9# http://github.com/nvie/gitflow
10#
11# Copyright (c) 2010 by Vincent Driessen
12# Copyright (c) 2010 by Benedikt Böhm
13#
14
Vincent Driessend72e4ac2010-02-16 21:33:51 +010015gitflow_require_git_repo
Vincent Driessenc1598bf2010-02-20 16:52:48 +010016gitflow_require_initialized
Vincent Driessend72e4ac2010-02-16 21:33:51 +010017gitflow_load_settings
Vincent Driessenc1598bf2010-02-20 16:52:48 +010018PREFIX=$(git config --get gitflow.prefix.feature)
Benedikt Böhm49dd62b2010-01-28 00:51:15 +010019
Benedikt Böhm00ccea62010-01-26 12:39:36 +010020usage() {
Vincent Driessenb03cf962010-02-01 22:00:39 +010021 echo "usage: git flow feature [list] [-v]"
22 echo " git flow feature start [-Fv] <name> [<base>]"
Vincent Driessen010252a2010-02-04 10:31:29 +010023 echo " git flow feature finish [-rsFv] <name|nameprefix>"
Vincent Driessen186d2b52010-01-27 23:48:39 +010024 echo " git flow feature publish <name>"
25 echo " git flow feature track <name>"
Vincent Driessenea608952010-01-29 16:56:29 +010026 echo " git flow feature diff <name|nameprefix>"
Vincent Driessenc62633f2010-02-02 10:48:50 +010027 echo " git flow feature rebase [-i] <name|nameprefix>"
Benedikt Böhm00ccea62010-01-26 12:39:36 +010028}
29
Vincent Driessen186d2b52010-01-27 23:48:39 +010030cmd_default() {
Vincent Driessenb866b012010-01-28 01:01:53 +010031 cmd_list "$@"
Benedikt Böhm00ccea62010-01-26 12:39:36 +010032}
33
Vincent Driessenb866b012010-01-28 01:01:53 +010034cmd_list() {
Vincent Driessen44174922010-02-02 23:53:21 +010035 DEFINE_boolean verbose false 'verbose (more) output' v
Vincent Driessen1b819232010-02-01 15:51:43 +010036 parse_args "$@"
37
Vincent Driessenf46e2902010-02-15 23:01:52 +010038 local feature_branches
39 local current_branch
40 local short_names
Vincent Driessen21c7aa92010-02-16 20:57:35 +010041 feature_branches=$(echo "$(gitflow_local_branches)" | grep "^$PREFIX")
Vincent Driessen27592dd2010-02-06 14:45:39 +010042 if [ -z "$feature_branches" ]; then
Vincent Driessen186d2b52010-01-27 23:48:39 +010043 warn "No feature branches exist."
44 exit 0
45 fi
Vincent Driessen27592dd2010-02-06 14:45:39 +010046 current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
47 short_names=$(echo "$feature_branches" | sed "s ^$PREFIX g")
Vincent Driessenf2536f42010-02-01 15:57:48 +010048
Vincent Driessenaa6d0162010-02-01 19:43:46 +010049 # determine column width first
Vincent Driessenf46e2902010-02-15 23:01:52 +010050 local width=0
51 local branch
Vincent Driessen27592dd2010-02-06 14:45:39 +010052 for branch in $short_names; do
Vincent Driessenf46e2902010-02-15 23:01:52 +010053 local len=${#branch}
Vincent Driessenaa6d0162010-02-01 19:43:46 +010054 width=$(max $width $len)
55 done
Vincent Driessenf46e2902010-02-15 23:01:52 +010056 width=$(($width+3))
Vincent Driessen1adbc3e2010-01-30 16:28:20 +010057
Vincent Driessenf46e2902010-02-15 23:01:52 +010058 local branch
Vincent Driessen27592dd2010-02-06 14:45:39 +010059 for branch in $short_names; do
Vincent Driessenf46e2902010-02-15 23:01:52 +010060 local fullname=$PREFIX$branch
61 local base=$(git merge-base "$fullname" "$DEVELOP_BRANCH")
62 local develop_sha=$(git rev-parse "$DEVELOP_BRANCH")
63 local branch_sha=$(git rev-parse "$fullname")
Vincent Driessen27592dd2010-02-06 14:45:39 +010064 if [ "$fullname" = "$current_branch" ]; then
Vincent Driessenaa6d0162010-02-01 19:43:46 +010065 printf "* "
66 else
67 printf " "
68 fi
Vincent Driessen44174922010-02-02 23:53:21 +010069 if flag verbose; then
Vincent Driessen1adbc3e2010-01-30 16:28:20 +010070 printf "%-${width}s" "$branch"
Vincent Driessenf2536f42010-02-01 15:57:48 +010071 if [ "$branch_sha" = "$develop_sha" ]; then
72 printf "(no commits yet)"
73 elif [ "$base" = "$branch_sha" ]; then
74 printf "(is behind develop, may ff)"
75 elif [ "$base" = "$develop_sha" ]; then
76 printf "(based on latest develop)"
77 else
78 printf "(may be rebased)"
79 fi
Vincent Driessenaa6d0162010-02-01 19:43:46 +010080 else
81 printf "%s" "$branch"
82 fi
83 echo
84 done
Vincent Driessen186d2b52010-01-27 23:48:39 +010085}
86
Benedikt Böhm00ccea62010-01-26 12:39:36 +010087cmd_help() {
88 usage
89 exit 0
90}
91
Vincent Driessend0991262010-02-06 21:19:07 +010092require_name_arg() {
Vincent Driessen1b819232010-02-01 15:51:43 +010093 if [ "$NAME" = "" ]; then
Vincent Driessen3c337fb2010-02-04 11:30:18 +010094 warn "Missing argument <name>"
Vincent Driessen1b819232010-02-01 15:51:43 +010095 usage
Vincent Driessen2e1856b2010-01-29 15:18:13 +010096 exit 1
97 fi
98}
99
Vincent Driessend0991262010-02-06 21:19:07 +0100100expand_nameprefix_arg() {
101 require_name_arg
102
Vincent Driessenf46e2902010-02-15 23:01:52 +0100103 local expanded_name
104 local exitcode
Vincent Driessend0991262010-02-06 21:19:07 +0100105 expanded_name=$(resolve_nameprefix "$NAME" "$PREFIX")
106 exitcode=$?
107 case $exitcode in
108 0) NAME=$expanded_name
109 BRANCH=$PREFIX$NAME
110 ;;
111 *) exit 1 ;;
112 esac
Vincent Driessen2e1856b2010-01-29 15:18:13 +0100113}
114
Vincent Driessend0991262010-02-06 21:19:07 +0100115expand_nameprefix_arg_or_current() {
Vincent Driessenc62633f2010-02-02 10:48:50 +0100116 if [ "$NAME" != "" ]; then
Vincent Driessend0991262010-02-06 21:19:07 +0100117 expand_nameprefix_arg
118 gitflow_require_branch "$PREFIX$NAME"
Vincent Driessenc62633f2010-02-02 10:48:50 +0100119 else
Vincent Driessenf46e2902010-02-15 23:01:52 +0100120 local current_branch=$(gitflow_current_branch)
Vincent Driessend0991262010-02-06 21:19:07 +0100121 if startswith "$current_branch" "$PREFIX"; then
122 BRANCH=$current_branch
123 NAME=${BRANCH#$PREFIX}
124 else
125 warn "The current HEAD is no feature branch."
126 warn "To diff a feature, specify a <name> argument."
127 usage
128 exit 1
129 fi
Vincent Driessenc62633f2010-02-02 10:48:50 +0100130 fi
131}
132
Vincent Driessenea608952010-01-29 16:56:29 +0100133parse_args() {
Vincent Driessen1b819232010-02-01 15:51:43 +0100134 # parse options
135 FLAGS "$@" || exit $?
136 eval set -- "${FLAGS_ARGV}"
137
138 # read arguments into global variables
Vincent Driessenc5fcc012010-02-10 00:18:08 +0100139 NAME=$1
Vincent Driessen11560922010-02-01 21:58:37 +0100140 BRANCH=$PREFIX$NAME
Vincent Driessenb866b012010-01-28 01:01:53 +0100141}
142
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100143cmd_start() {
Vincent Driessen44174922010-02-02 23:53:21 +0100144 DEFINE_boolean fetch false 'fetch from origin before performing local operation' F
Vincent Driessen5455a6f2010-02-03 00:14:05 +0100145 DEFINE_boolean force false 'force creation of feature branch (ignores dirty working tree)' f
Vincent Driessenea608952010-01-29 16:56:29 +0100146 parse_args "$@"
Vincent Driessenc5fcc012010-02-10 00:18:08 +0100147 BASE=${2:-$DEVELOP_BRANCH}
Vincent Driessend0991262010-02-06 21:19:07 +0100148 require_name_arg
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100149
150 # sanity checks
Vincent Driessen5455a6f2010-02-03 00:14:05 +0100151 if noflag force; then
152 gitflow_require_clean_working_tree
153 fi
Vincent Driessena4dd2232010-02-10 00:34:59 +0100154 gitflow_require_branch_absent "$BRANCH"
Vincent Driessene034e4a2010-01-29 12:10:44 +0100155
156 # update the local repo with remote changes, if asked
Vincent Driessen44174922010-02-02 23:53:21 +0100157 if flag fetch; then
Vincent Driessena4dd2232010-02-10 00:34:59 +0100158 git fetch -q "$ORIGIN" "$DEVELOP_BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100159 fi
160
Vincent Driessena4dd2232010-02-10 00:34:59 +0100161 gitflow_require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
Vincent Driessene034e4a2010-01-29 12:10:44 +0100162
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100163 # create branch
Vincent Driessena4dd2232010-02-10 00:34:59 +0100164 if ! git checkout -b "$BRANCH" "$BASE"; then
Vincent Driessen5455a6f2010-02-03 00:14:05 +0100165 die "Could not create feature branch '$BRANCH'"
166 fi
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100167
168 echo
169 echo "Summary of actions:"
170 echo "- A new branch '$BRANCH' was created, based on '$BASE'"
171 echo "- You are now on branch '$BRANCH'"
172 echo ""
173 echo "Now, start committing on your feature. When done, use:"
174 echo ""
175 echo " git flow finish feature $NAME"
176 echo
177}
178
179cmd_finish() {
Vincent Driessenca73caf2010-02-07 19:46:38 +0100180 DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
Vincent Driessen44174922010-02-02 23:53:21 +0100181 DEFINE_boolean rebase false 'rebase instead of merge' r
182 DEFINE_boolean squash false 'squash all commits when rebasing (implies --rebase)' s
Vincent Driessen1b819232010-02-01 15:51:43 +0100183 parse_args "$@"
Vincent Driessend0991262010-02-06 21:19:07 +0100184 expand_nameprefix_arg
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100185
186 # sanity checks
Vincent Driessena4dd2232010-02-10 00:34:59 +0100187 gitflow_require_branch "$BRANCH"
Vincent Driessene034e4a2010-01-29 12:10:44 +0100188
Vincent Driessen49c7d022010-01-28 12:40:33 +0100189 # detect if we're restoring from a merge conflict
Vincent Driessencf6e92a2010-02-19 19:44:48 +0100190 if [ -f "$DOT_GIT_DIR/.gitflow/MERGE_BASE" ]; then
Vincent Driessen49c7d022010-01-28 12:40:33 +0100191 #
192 # TODO: detect that we're working on the correct branch here!
193 # The user need not necessarily have given the same $NAME twice here
194 # (although he/she should).
195 #
Vincent Driessenf6f152f2010-01-29 10:28:08 +0100196
197 # TODO: gitflow_test_clean_working_tree() should provide an alternative
198 # exit code for "unmerged changes in working tree", which we should
199 # actually be testing for here
200 if gitflow_test_clean_working_tree; then
Vincent Driessencf6e92a2010-02-19 19:44:48 +0100201 FINISH_BASE=$(cat "$DOT_GIT_DIR/.gitflow/MERGE_BASE")
Vincent Driessenf6f152f2010-01-29 10:28:08 +0100202
203 # Since the working tree is now clean, either the user did a
204 # succesfull merge manually, or the merge was cancelled.
205 # We detect this using gitflow_is_branch_merged_into()
Vincent Driessena4dd2232010-02-10 00:34:59 +0100206 if gitflow_is_branch_merged_into "$BRANCH" "$FINISH_BASE"; then
Vincent Driessencf6e92a2010-02-19 19:44:48 +0100207 rm -f "$DOT_GIT_DIR/.gitflow/MERGE_BASE"
Vincent Driessenf6f152f2010-01-29 10:28:08 +0100208 helper_finish_cleanup
209 exit 0
210 else
211 # If the user cancelled the merge and decided to wait until later,
212 # that's fine. But we have to acknowledge this by removing the
213 # MERGE_BASE file and continuing normal execution of the finish
Vincent Driessencf6e92a2010-02-19 19:44:48 +0100214 rm -f "$DOT_GIT_DIR/.gitflow/MERGE_BASE"
Vincent Driessenf6f152f2010-01-29 10:28:08 +0100215 fi
Vincent Driessen49c7d022010-01-28 12:40:33 +0100216 else
217 echo
218 echo "Merge conflicts not resolved yet, use:"
219 echo " git mergetool"
220 echo " git commit"
221 echo
222 echo "You can then complete the finish by running it again:"
223 echo " git flow feature finish $NAME"
224 echo
225 exit 1
226 fi
227 fi
228
Vincent Driessenf6f152f2010-01-29 10:28:08 +0100229 # sanity checks
230 gitflow_require_clean_working_tree
231
Vincent Driessene034e4a2010-01-29 12:10:44 +0100232 # update local repo with remote changes first, if asked
Vincent Driessen44174922010-02-02 23:53:21 +0100233 if flag fetch; then
Vincent Driessena4dd2232010-02-10 00:34:59 +0100234 git fetch -q "$ORIGIN" "$BRANCH"
Vincent Driessene034e4a2010-01-29 12:10:44 +0100235 fi
236
Vincent Driessen21c7aa92010-02-16 20:57:35 +0100237 if has "$ORIGIN/$BRANCH" "$(gitflow_remote_branches)"; then
Vincent Driessena4dd2232010-02-10 00:34:59 +0100238 gitflow_require_branches_equal "$BRANCH" "$ORIGIN/$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100239 fi
Vincent Driessena4dd2232010-02-10 00:34:59 +0100240 gitflow_require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100241
Vincent Driessen95bf82c2010-02-02 11:58:37 +0100242 # if the user wants to rebase, do that first
Vincent Driessen44174922010-02-02 23:53:21 +0100243 if flag rebase; then
Vincent Driessen010252a2010-02-04 10:31:29 +0100244 if ! git flow feature rebase "$NAME" "$DEVELOP_BRANCH"; then
Vincent Driessen95bf82c2010-02-02 11:58:37 +0100245 warn "Finish was aborted due to conflicts during rebase."
246 warn "Please finish the rebase manually now."
247 warn "When finished, re-run:"
Vincent Driessen010252a2010-02-04 10:31:29 +0100248 warn " git flow feature finish '$NAME' '$DEVELOP_BRANCH'"
Vincent Driessen95bf82c2010-02-02 11:58:37 +0100249 exit 1
250 fi
251 fi
252
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100253 # merge into BASE
Vincent Driessena4dd2232010-02-10 00:34:59 +0100254 git checkout "$DEVELOP_BRANCH"
255 if [ "$(git rev-list -n2 "$DEVELOP_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then
256 git merge --ff "$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100257 else
Vincent Driessena4dd2232010-02-10 00:34:59 +0100258 git merge --no-ff "$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100259 fi
260
Vincent Driessen49c7d022010-01-28 12:40:33 +0100261 if [ $? -ne 0 ]; then
262 # oops.. we have a merge conflict!
Vincent Driessen010252a2010-02-04 10:31:29 +0100263 # write the given $DEVELOP_BRANCH to a temporary file (we need it later)
Vincent Driessencf6e92a2010-02-19 19:44:48 +0100264 mkdir -p "$DOT_GIT_DIR/.gitflow"
265 echo "$DEVELOP_BRANCH" > "$DOT_GIT_DIR/.gitflow/MERGE_BASE"
Vincent Driessen49c7d022010-01-28 12:40:33 +0100266 echo
267 echo "There were merge conflicts. To resolve the merge conflict manually, use:"
268 echo " git mergetool"
269 echo " git commit"
270 echo
271 echo "You can then complete the finish by running it again:"
272 echo " git flow feature finish $NAME"
273 echo
274 exit 1
275 fi
276
277 # when no merge conflict is detected, just clean up the feature branch
278 helper_finish_cleanup
279}
280
281helper_finish_cleanup() {
Vincent Driessenf6f152f2010-01-29 10:28:08 +0100282 # sanity checks
Vincent Driessena4dd2232010-02-10 00:34:59 +0100283 gitflow_require_branch "$BRANCH"
Vincent Driessen1ee37e72010-01-29 17:36:21 +0100284 gitflow_require_clean_working_tree
Vincent Driessenf6f152f2010-01-29 10:28:08 +0100285
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100286 # delete branch
Vincent Driessen44174922010-02-02 23:53:21 +0100287 if flag fetch; then
Vincent Driessena4dd2232010-02-10 00:34:59 +0100288 git push "$ORIGIN" ":refs/heads/$BRANCH"
Vincent Driesseneec73c62010-02-02 16:14:16 +0100289 fi
Vincent Driessena4dd2232010-02-10 00:34:59 +0100290 git branch -d "$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100291
292 echo
293 echo "Summary of actions:"
Vincent Driessen010252a2010-02-04 10:31:29 +0100294 echo "- The feature branch '$BRANCH' was merged into '$DEVELOP_BRANCH'"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100295 #echo "- Merge conflicts were resolved" # TODO: Add this line when it's supported
296 echo "- Feature branch '$BRANCH' has been removed"
Vincent Driessen010252a2010-02-04 10:31:29 +0100297 echo "- You are now on branch '$DEVELOP_BRANCH'"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100298 echo
299}
300
301cmd_publish() {
Vincent Driessenea608952010-01-29 16:56:29 +0100302 parse_args "$@"
Vincent Driessend0991262010-02-06 21:19:07 +0100303 expand_nameprefix_arg
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100304
305 # sanity checks
Vincent Driessen48386442010-01-29 10:30:40 +0100306 gitflow_require_clean_working_tree
Vincent Driessena4dd2232010-02-10 00:34:59 +0100307 gitflow_require_branch "$BRANCH"
308 git fetch -q "$ORIGIN"
309 gitflow_require_branch_absent "$ORIGIN/$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100310
311 # create remote branch
Vincent Driessena4dd2232010-02-10 00:34:59 +0100312 git push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH"
313 git fetch -q "$ORIGIN"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100314
315 # configure remote tracking
Vincent Driessena4dd2232010-02-10 00:34:59 +0100316 git config "branch.$BRANCH.remote" "$ORIGIN"
317 git config "branch.$BRANCH.merge" "refs/heads/$BRANCH"
318 git checkout "$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100319
320 echo
321 echo "Summary of actions:"
322 echo "- A new remote branch '$BRANCH' was created"
323 echo "- The local branch '$BRANCH' was configured to track the remote branch"
324 echo "- You are now on branch '$BRANCH'"
325 echo
326}
327
328cmd_track() {
Vincent Driessenea608952010-01-29 16:56:29 +0100329 parse_args "$@"
Vincent Driessend0991262010-02-06 21:19:07 +0100330 require_name_arg
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100331
332 # sanity checks
Vincent Driessen48386442010-01-29 10:30:40 +0100333 gitflow_require_clean_working_tree
Vincent Driessena4dd2232010-02-10 00:34:59 +0100334 gitflow_require_branch_absent "$BRANCH"
335 git fetch -q "$ORIGIN"
336 gitflow_require_branch "$ORIGIN/$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100337
338 # create tracking branch
Vincent Driessena4dd2232010-02-10 00:34:59 +0100339 git checkout -b "$BRANCH" "$ORIGIN/$BRANCH"
Benedikt Böhm00ccea62010-01-26 12:39:36 +0100340
341 echo
342 echo "Summary of actions:"
343 echo "- A new remote tracking branch '$BRANCH' was created"
344 echo "- You are now on branch '$BRANCH'"
345 echo
346}
Vincent Driessenbd4f0952010-01-27 13:57:15 +0100347
Vincent Driessenbd4f0952010-01-27 13:57:15 +0100348cmd_diff() {
Vincent Driessen1b819232010-02-01 15:51:43 +0100349 parse_args "$@"
Vincent Driessen1b819232010-02-01 15:51:43 +0100350
Vincent Driessen5474e462010-02-04 15:50:06 +0100351 if [ "$NAME" != "" ]; then
Vincent Driessend0991262010-02-06 21:19:07 +0100352 expand_nameprefix_arg
Vincent Driessena4dd2232010-02-10 00:34:59 +0100353 BASE=$(git merge-base "$DEVELOP_BRANCH" "$BRANCH")
354 git diff "$BASE..$BRANCH"
Vincent Driessen5474e462010-02-04 15:50:06 +0100355 else
Vincent Driessend0991262010-02-06 21:19:07 +0100356 if ! gitflow_current_branch | grep -q "^$PREFIX"; then
Vincent Driessen5474e462010-02-04 15:50:06 +0100357 die "Not on a feature branch. Name one explicitly."
358 fi
359
Vincent Driessena4dd2232010-02-10 00:34:59 +0100360 BASE=$(git merge-base "$DEVELOP_BRANCH" HEAD)
361 git diff "$BASE"
Vincent Driessen5474e462010-02-04 15:50:06 +0100362 fi
Vincent Driessenbd4f0952010-01-27 13:57:15 +0100363}
Vincent Driessenc62633f2010-02-02 10:48:50 +0100364
365cmd_rebase() {
Vincent Driessen44174922010-02-02 23:53:21 +0100366 DEFINE_boolean interactive false 'do an interactive rebase' i
Vincent Driessenc62633f2010-02-02 10:48:50 +0100367 parse_args "$@"
Vincent Driessend0991262010-02-06 21:19:07 +0100368 expand_nameprefix_arg_or_current
Vincent Driessenc62633f2010-02-02 10:48:50 +0100369 warn "Will try to rebase '$NAME'..."
370 gitflow_require_clean_working_tree
371 gitflow_require_branch "$BRANCH"
372
373 git checkout -q "$BRANCH"
Vincent Driessenf46e2902010-02-15 23:01:52 +0100374 local OPTS=
Vincent Driessen44174922010-02-02 23:53:21 +0100375 if flag interactive; then
Vincent Driessenc62633f2010-02-02 10:48:50 +0100376 OPTS="$OPTS -i"
377 fi
Vincent Driessen010252a2010-02-04 10:31:29 +0100378 git rebase $OPTS "$DEVELOP_BRANCH"
Vincent Driessenc62633f2010-02-02 10:48:50 +0100379}