Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 1 | # |
Vincent Driessen | 6c2d30b | 2010-01-26 22:18:36 +0100 | [diff] [blame] | 2 | # git-flow -- A collection of Git extensions to provide high-level |
| 3 | # repository operations for Vincent Driessen's branching model. |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 4 | # |
| 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 | |
Benedikt Böhm | 49dd62b | 2010-01-28 00:51:15 +0100 | [diff] [blame] | 15 | PREFIX=$(git config --get gitflow.prefix.feature || echo feature/) |
| 16 | |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 17 | usage() { |
Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 18 | echo "usage: git flow feature [list]" |
Vincent Driessen | 186d2b5 | 2010-01-27 23:48:39 +0100 | [diff] [blame] | 19 | echo " git flow feature start <name> [<base>]" |
Vincent Driessen | ea60895 | 2010-01-29 16:56:29 +0100 | [diff] [blame] | 20 | echo " git flow feature finish <name|nameprefix> [<base>]" |
Vincent Driessen | 186d2b5 | 2010-01-27 23:48:39 +0100 | [diff] [blame] | 21 | echo " git flow feature publish <name>" |
| 22 | echo " git flow feature track <name>" |
Vincent Driessen | ea60895 | 2010-01-29 16:56:29 +0100 | [diff] [blame] | 23 | echo " git flow feature diff <name|nameprefix>" |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 24 | # TODO |
| 25 | #echo "" |
| 26 | #echo "options:" |
| 27 | #echo "--option Explanation" |
| 28 | #echo "" |
| 29 | #echo "start-only options:" |
| 30 | #echo "--option Explanation" |
| 31 | #echo "" |
| 32 | #echo "finish-only options:" |
| 33 | #echo "--rebase Rebases the feature branch on top of develop, instead of merging" |
| 34 | #echo "--squash Squashes all commits of the feature branch into a single commit" |
| 35 | #echo " on develop" |
| 36 | #echo "--push Push to the origin repo when finished" |
| 37 | } |
| 38 | |
Vincent Driessen | 186d2b5 | 2010-01-27 23:48:39 +0100 | [diff] [blame] | 39 | cmd_default() { |
Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 40 | cmd_list "$@" |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 41 | } |
| 42 | |
Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 43 | cmd_list() { |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 44 | DEFINE_boolean verbose 0 'verbose (more) output' v |
| 45 | parse_args "$@" |
| 46 | |
Vincent Driessen | 186d2b5 | 2010-01-27 23:48:39 +0100 | [diff] [blame] | 47 | FEATURE_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")" |
| 48 | if [ -z "$FEATURE_BRANCHES" ]; then |
| 49 | warn "No feature branches exist." |
| 50 | exit 0 |
| 51 | fi |
Vincent Driessen | f2536f4 | 2010-02-01 15:57:48 +0100 | [diff] [blame^] | 52 | |
| 53 | SHORT_NAMES=$(echo "$FEATURE_BRANCHES" | sed "s?^$PREFIX??g") |
| 54 | if [ $FLAGS_verbose -eq 0 ]; then |
| 55 | echo "$SHORT_NAMES" |
| 56 | else |
| 57 | for branch in $SHORT_NAMES; do |
| 58 | fullname="$PREFIX$branch" |
| 59 | base=$(git merge-base "$fullname" "$DEVELOP_BRANCH") |
| 60 | develop_sha=$(git rev-parse "$DEVELOP_BRANCH") |
| 61 | branch_sha=$(git rev-parse "$fullname") |
| 62 | printf "%-40s" "$branch" |
| 63 | if [ "$branch_sha" = "$develop_sha" ]; then |
| 64 | printf "(no commits yet)" |
| 65 | elif [ "$base" = "$branch_sha" ]; then |
| 66 | printf "(is behind develop, may ff)" |
| 67 | elif [ "$base" = "$develop_sha" ]; then |
| 68 | printf "(based on latest develop)" |
| 69 | else |
| 70 | printf "(may be rebased)" |
| 71 | fi |
| 72 | echo |
| 73 | done |
| 74 | fi |
Vincent Driessen | 186d2b5 | 2010-01-27 23:48:39 +0100 | [diff] [blame] | 75 | } |
| 76 | |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 77 | cmd_help() { |
| 78 | usage |
| 79 | exit 0 |
| 80 | } |
| 81 | |
Vincent Driessen | 22ef21a | 2010-01-29 16:43:37 +0100 | [diff] [blame] | 82 | resolve_name_by_prefix() { |
Vincent Driessen | 2e1856b | 2010-01-29 15:18:13 +0100 | [diff] [blame] | 83 | # first, check if there is a perfect match |
Vincent Driessen | 22ef21a | 2010-01-29 16:43:37 +0100 | [diff] [blame] | 84 | if has "$LOCAL_BRANCHES" "$PREFIX$1"; then |
| 85 | echo "$1" |
| 86 | return 0 |
Vincent Driessen | 2e1856b | 2010-01-29 15:18:13 +0100 | [diff] [blame] | 87 | fi |
| 88 | |
| 89 | MATCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX$1")" |
| 90 | NUM_MATCHES=$(echo "$MATCHES" | wc -l) |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 91 | if [ -z "$MATCHES" ]; then |
Vincent Driessen | 2e1856b | 2010-01-29 15:18:13 +0100 | [diff] [blame] | 92 | # no prefix match, so take it literally |
| 93 | echo "$1" |
| 94 | else |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 95 | if [ $NUM_MATCHES -eq 1 ]; then |
| 96 | # sed arg looks a bit weird, but $PREFIX should not contain spaces, |
| 97 | # so this one is safe |
| 98 | echo "$MATCHES" | sed "s $PREFIX g" |
| 99 | else |
| 100 | # multiple matches, cannot decide |
| 101 | warn "Multiple branches match for prefix '$1':" |
| 102 | for match in $MATCHES; do |
| 103 | warn "- $match" |
| 104 | done |
| 105 | die "Aborting. Use an unambiguous prefix." |
| 106 | fi |
Vincent Driessen | 2e1856b | 2010-01-29 15:18:13 +0100 | [diff] [blame] | 107 | fi |
| 108 | } |
| 109 | |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 110 | require_name() { |
| 111 | if [ "$NAME" = "" ]; then |
| 112 | echo "Missing argument <name>" |
| 113 | usage |
Vincent Driessen | 2e1856b | 2010-01-29 15:18:13 +0100 | [diff] [blame] | 114 | exit 1 |
| 115 | fi |
| 116 | } |
| 117 | |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 118 | expand_name_arg_prefix() { |
| 119 | require_name |
| 120 | NAME=$(resolve_name_by_prefix "$NAME") |
| 121 | if echo "$NAME" | grep -q "^[ \t\n\r]+$"; then |
Vincent Driessen | 2e1856b | 2010-01-29 15:18:13 +0100 | [diff] [blame] | 122 | exit 1 |
| 123 | fi |
| 124 | BRANCH=$PREFIX$NAME |
| 125 | } |
| 126 | |
Vincent Driessen | ea60895 | 2010-01-29 16:56:29 +0100 | [diff] [blame] | 127 | parse_args() { |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 128 | # parse options |
| 129 | FLAGS "$@" || exit $? |
| 130 | eval set -- "${FLAGS_ARGV}" |
| 131 | |
| 132 | # read arguments into global variables |
Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 133 | NAME="$1" |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 134 | BASE="${2:-$DEVELOP_BRANCH}" |
Vincent Driessen | b866b01 | 2010-01-28 01:01:53 +0100 | [diff] [blame] | 135 | } |
| 136 | |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 137 | cmd_start() { |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 138 | DEFINE_boolean fetch 0 'fetch from origin before performing local operation' F |
Vincent Driessen | ea60895 | 2010-01-29 16:56:29 +0100 | [diff] [blame] | 139 | parse_args "$@" |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 140 | require_name |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 141 | |
| 142 | # sanity checks |
Vincent Driessen | 4838644 | 2010-01-29 10:30:40 +0100 | [diff] [blame] | 143 | gitflow_require_clean_working_tree |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 144 | gitflow_require_branch_absent $BRANCH |
Vincent Driessen | e034e4a | 2010-01-29 12:10:44 +0100 | [diff] [blame] | 145 | |
| 146 | # update the local repo with remote changes, if asked |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 147 | if [ $FLAGS_fetch -eq 1 ]; then |
Benedikt Böhm | 4d22227 | 2010-01-26 14:46:56 +0100 | [diff] [blame] | 148 | git fetch -q $ORIGIN $DEVELOP_BRANCH |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 149 | fi |
| 150 | |
Vincent Driessen | e034e4a | 2010-01-29 12:10:44 +0100 | [diff] [blame] | 151 | gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH |
| 152 | |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 153 | # create branch |
| 154 | git checkout -b $BRANCH $BASE |
| 155 | |
| 156 | echo |
| 157 | echo "Summary of actions:" |
| 158 | echo "- A new branch '$BRANCH' was created, based on '$BASE'" |
| 159 | echo "- You are now on branch '$BRANCH'" |
| 160 | echo "" |
| 161 | echo "Now, start committing on your feature. When done, use:" |
| 162 | echo "" |
| 163 | echo " git flow finish feature $NAME" |
| 164 | echo |
| 165 | } |
| 166 | |
| 167 | cmd_finish() { |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 168 | DEFINE_boolean fetch 0 'fetch from origin before performing local operation' F |
| 169 | DEFINE_boolean rebase 0 'rebase instead of merge' r |
| 170 | DEFINE_boolean squash 0 'squash all commits when rebasing (implies --rebase)' s |
| 171 | parse_args "$@" |
| 172 | expand_name_arg_prefix |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 173 | |
| 174 | # sanity checks |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 175 | gitflow_require_branch $BRANCH |
Vincent Driessen | e034e4a | 2010-01-29 12:10:44 +0100 | [diff] [blame] | 176 | |
Vincent Driessen | 49c7d02 | 2010-01-28 12:40:33 +0100 | [diff] [blame] | 177 | # detect if we're restoring from a merge conflict |
| 178 | if [ -f "$GIT_DIR/.gitflow/MERGE_BASE" ]; then |
| 179 | # |
| 180 | # TODO: detect that we're working on the correct branch here! |
| 181 | # The user need not necessarily have given the same $NAME twice here |
| 182 | # (although he/she should). |
| 183 | # |
Vincent Driessen | f6f152f | 2010-01-29 10:28:08 +0100 | [diff] [blame] | 184 | |
| 185 | # TODO: gitflow_test_clean_working_tree() should provide an alternative |
| 186 | # exit code for "unmerged changes in working tree", which we should |
| 187 | # actually be testing for here |
| 188 | if gitflow_test_clean_working_tree; then |
| 189 | FINISH_BASE="$(cat "$GIT_DIR/.gitflow/MERGE_BASE")" |
| 190 | |
| 191 | # Since the working tree is now clean, either the user did a |
| 192 | # succesfull merge manually, or the merge was cancelled. |
| 193 | # We detect this using gitflow_is_branch_merged_into() |
| 194 | if gitflow_is_branch_merged_into $BRANCH $FINISH_BASE; then |
| 195 | rm -f "$GIT_DIR/.gitflow/MERGE_BASE" |
| 196 | helper_finish_cleanup |
| 197 | exit 0 |
| 198 | else |
| 199 | # If the user cancelled the merge and decided to wait until later, |
| 200 | # that's fine. But we have to acknowledge this by removing the |
| 201 | # MERGE_BASE file and continuing normal execution of the finish |
| 202 | rm -f "$GIT_DIR/.gitflow/MERGE_BASE" |
| 203 | fi |
Vincent Driessen | 49c7d02 | 2010-01-28 12:40:33 +0100 | [diff] [blame] | 204 | else |
| 205 | echo |
| 206 | echo "Merge conflicts not resolved yet, use:" |
| 207 | echo " git mergetool" |
| 208 | echo " git commit" |
| 209 | echo |
| 210 | echo "You can then complete the finish by running it again:" |
| 211 | echo " git flow feature finish $NAME" |
| 212 | echo |
| 213 | exit 1 |
| 214 | fi |
| 215 | fi |
| 216 | |
Vincent Driessen | f6f152f | 2010-01-29 10:28:08 +0100 | [diff] [blame] | 217 | # sanity checks |
| 218 | gitflow_require_clean_working_tree |
| 219 | |
Vincent Driessen | e034e4a | 2010-01-29 12:10:44 +0100 | [diff] [blame] | 220 | # update local repo with remote changes first, if asked |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 221 | if [ $FLAGS_fetch -eq 1 ]; then |
Vincent Driessen | e034e4a | 2010-01-29 12:10:44 +0100 | [diff] [blame] | 222 | git fetch -q $ORIGIN $BRANCH |
| 223 | fi |
| 224 | |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 225 | if has $ORIGIN/$BRANCH $REMOTE_BRANCHES; then |
| 226 | gitflow_require_branches_equal $BRANCH $ORIGIN/$BRANCH |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 227 | fi |
Benedikt Böhm | 4a864fb | 2010-01-26 12:59:27 +0100 | [diff] [blame] | 228 | if [ "$BASE" = "$DEVELOP_BRANCH" ]; then |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 229 | gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 230 | fi |
| 231 | |
| 232 | # merge into BASE |
| 233 | git checkout $BASE |
| 234 | if [ "$(git rev-list -n2 $BASE..$BRANCH | wc -l)" = "1" ]; then |
| 235 | git merge --ff $BRANCH |
| 236 | else |
| 237 | git merge --no-ff $BRANCH |
| 238 | fi |
| 239 | |
Vincent Driessen | 49c7d02 | 2010-01-28 12:40:33 +0100 | [diff] [blame] | 240 | if [ $? -ne 0 ]; then |
| 241 | # oops.. we have a merge conflict! |
| 242 | # write the given $BASE to a temporary file (we need it later) |
Vincent Driessen | f6f152f | 2010-01-29 10:28:08 +0100 | [diff] [blame] | 243 | mkdir -p "$GIT_DIR/.gitflow" |
Vincent Driessen | 49c7d02 | 2010-01-28 12:40:33 +0100 | [diff] [blame] | 244 | echo "$BASE" > "$GIT_DIR/.gitflow/MERGE_BASE" |
| 245 | echo |
| 246 | echo "There were merge conflicts. To resolve the merge conflict manually, use:" |
| 247 | echo " git mergetool" |
| 248 | echo " git commit" |
| 249 | echo |
| 250 | echo "You can then complete the finish by running it again:" |
| 251 | echo " git flow feature finish $NAME" |
| 252 | echo |
| 253 | exit 1 |
| 254 | fi |
| 255 | |
| 256 | # when no merge conflict is detected, just clean up the feature branch |
| 257 | helper_finish_cleanup |
| 258 | } |
| 259 | |
| 260 | helper_finish_cleanup() { |
Vincent Driessen | f6f152f | 2010-01-29 10:28:08 +0100 | [diff] [blame] | 261 | # sanity checks |
| 262 | gitflow_require_branch $BRANCH |
Vincent Driessen | 1ee37e7 | 2010-01-29 17:36:21 +0100 | [diff] [blame] | 263 | gitflow_require_clean_working_tree |
Vincent Driessen | f6f152f | 2010-01-29 10:28:08 +0100 | [diff] [blame] | 264 | |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 265 | # delete branch |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 266 | git push $ORIGIN :refs/heads/$BRANCH |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 267 | git branch -d $BRANCH |
| 268 | |
| 269 | echo |
| 270 | echo "Summary of actions:" |
| 271 | echo "- The feature branch '$BRANCH' was merged into '$BASE'" |
| 272 | #echo "- Merge conflicts were resolved" # TODO: Add this line when it's supported |
| 273 | echo "- Feature branch '$BRANCH' has been removed" |
| 274 | echo "- You are now on branch '$BASE'" |
| 275 | echo |
| 276 | } |
| 277 | |
| 278 | cmd_publish() { |
Vincent Driessen | ea60895 | 2010-01-29 16:56:29 +0100 | [diff] [blame] | 279 | parse_args "$@" |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 280 | expand_name_arg_prefix |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 281 | |
| 282 | # sanity checks |
Vincent Driessen | 4838644 | 2010-01-29 10:30:40 +0100 | [diff] [blame] | 283 | gitflow_require_clean_working_tree |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 284 | gitflow_require_branch $BRANCH |
Benedikt Böhm | 4d22227 | 2010-01-26 14:46:56 +0100 | [diff] [blame] | 285 | git fetch -q $ORIGIN |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 286 | gitflow_require_branch_absent $ORIGIN/$BRANCH |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 287 | |
| 288 | # create remote branch |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 289 | git push $ORIGIN $BRANCH:refs/heads/$BRANCH |
Benedikt Böhm | 4d22227 | 2010-01-26 14:46:56 +0100 | [diff] [blame] | 290 | git fetch -q $ORIGIN |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 291 | |
| 292 | # configure remote tracking |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 293 | git config branch.$BRANCH.remote $ORIGIN |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 294 | git config branch.$BRANCH.merge refs/heads/$BRANCH |
| 295 | git checkout $BRANCH |
| 296 | |
| 297 | echo |
| 298 | echo "Summary of actions:" |
| 299 | echo "- A new remote branch '$BRANCH' was created" |
| 300 | echo "- The local branch '$BRANCH' was configured to track the remote branch" |
| 301 | echo "- You are now on branch '$BRANCH'" |
| 302 | echo |
| 303 | } |
| 304 | |
| 305 | cmd_track() { |
Vincent Driessen | ea60895 | 2010-01-29 16:56:29 +0100 | [diff] [blame] | 306 | parse_args "$@" |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 307 | require_name |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 308 | |
| 309 | # sanity checks |
Vincent Driessen | 4838644 | 2010-01-29 10:30:40 +0100 | [diff] [blame] | 310 | gitflow_require_clean_working_tree |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 311 | gitflow_require_branch_absent $BRANCH |
Benedikt Böhm | 4d22227 | 2010-01-26 14:46:56 +0100 | [diff] [blame] | 312 | git fetch -q $ORIGIN |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 313 | gitflow_require_branch $ORIGIN/$BRANCH |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 314 | |
| 315 | # create tracking branch |
Benedikt Böhm | 350e715 | 2010-01-26 13:05:05 +0100 | [diff] [blame] | 316 | git checkout -b $BRANCH $ORIGIN/$BRANCH |
Benedikt Böhm | 00ccea6 | 2010-01-26 12:39:36 +0100 | [diff] [blame] | 317 | |
| 318 | echo |
| 319 | echo "Summary of actions:" |
| 320 | echo "- A new remote tracking branch '$BRANCH' was created" |
| 321 | echo "- You are now on branch '$BRANCH'" |
| 322 | echo |
| 323 | } |
Vincent Driessen | bd4f095 | 2010-01-27 13:57:15 +0100 | [diff] [blame] | 324 | |
Vincent Driessen | bd4f095 | 2010-01-27 13:57:15 +0100 | [diff] [blame] | 325 | cmd_diff() { |
Vincent Driessen | 1b81923 | 2010-02-01 15:51:43 +0100 | [diff] [blame] | 326 | parse_args "$@" |
| 327 | expand_name_arg_prefix |
| 328 | |
Vincent Driessen | bd4f095 | 2010-01-27 13:57:15 +0100 | [diff] [blame] | 329 | # TODO: if this feature has been based on a non-develop branch, we really |
| 330 | # should not be comparing to $DEVELOP. How to deal with this? |
Vincent Driessen | 278884b | 2010-01-28 16:29:34 +0100 | [diff] [blame] | 331 | git diff $DEVELOP_BRANCH..$BRANCH |
Vincent Driessen | bd4f095 | 2010-01-27 13:57:15 +0100 | [diff] [blame] | 332 | } |