diff --git a/guilt-commit b/guilt-commit index 0486ae6..6ee1f16 100755 --- a/guilt-commit +++ b/guilt-commit @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) Josef "Jeff" Sipek, 2008-2011 +# Copyright (c) Josef "Jeff" Sipek, 2008-2013 # USAGE="-n | -a | --all" @@ -35,6 +35,10 @@ esac # remove patch refs for what's being committed, and update series sed -n -e "${pat_commit}" "$applied" | while read pname; do + # update the base branch to the last committed patch + $old_style_prefix || git update-ref refs/heads/$branch \ + refs/patches/$branch/$pname + series_remove_patch "$pname" echo "$pname" | remove_patch_refs done diff --git a/regression/t-061.out b/regression/t-061.out index 8365236..ef0f335 100644 --- a/regression/t-061.out +++ b/regression/t-061.out @@ -454,7 +454,7 @@ fefbdcef61022d473838926619f31e030dd04fdc commit refs/patches/master/mode % guilt commit -n 2 % git for-each-ref fefbdcef61022d473838926619f31e030dd04fdc commit refs/heads/guilt/master -25465dc1687f3833ecbd4e8bca437e522d7026db commit refs/heads/master +5effcbeb303e8433935151d8c69f3bf63db1e8ef commit refs/heads/master fefbdcef61022d473838926619f31e030dd04fdc commit refs/patches/master/mode 9cbe2fc643b1a9e2179a8738f80424a1c2aa202d commit refs/patches/master/remove % git branch