3 # Copyright (c) Josef "Jeff" Sipek, 2007-2008
13 # make sure that there are no unapplied changes
14 if ! must_commit_first
; then
15 die
"Uncommited changes detected. Refresh first."
19 newbranch
="$branch-`date +%Y-%m-%d`"
24 if [ -e "$GUILT_DIR/$newbranch" ]; then
25 die
"Patch directory for branch \"$newbranch\" already exists."
28 cat "$applied" |
while read n
; do
29 git update-ref
"refs/patches/$newbranch/$n" \
30 `git rev-parse "refs/patches/$branch/$n"` ""
33 git branch
"$newbranch"
34 git checkout
"$newbranch"
36 mkdir
-p "$GUILT_DIR/`dirname $newbranch`"
39 cp -a "$GUILT_DIR/$branch" "$GUILT_DIR/$newbranch"