rebase: Rebase pushed patches against an upstream branch
[guilt/mob.git] / guilt-series
blobaf1c8f2cbe31e21378c800e82e1378b55636449a
1 #!/bin/bash
3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 USAGE="[-v]"
7 . guilt
9 while case "$#" in 0) break ;; esac
11 case "$1" in
12 -v)
13 verbose=t ;;
15 usage ;;
16 esac
17 shift
18 done
20 if ! [ $verbose ]; then
21 get_series
22 else
23 prefix="+"
24 top=$(get_top)
26 get_series |
27 while read patch; do
28 if [ -z "$top" ]; then
29 echo " $patch"
30 else
31 if [ "$patch" = "$top" ]; then
32 echo "= $patch"
33 prefix=" "
34 else
35 echo "$prefix $patch"
38 done