3 # Copyright (c) Josef "Jeff" Sipek, 2007-2011
7 if [ -z "$GUILT_VERSION" ]; then
8 echo "Invoking `basename $0` directly is no longer supported." >&2
18 # make sure that there are no unapplied changes
19 if ! must_commit_first
; then
20 die
"Uncommited changes detected. Refresh first."
24 newbranch
="$branch-`date +%Y-%m-%d`"
29 if [ -e "$GUILT_DIR/$newbranch" ]; then
30 die
"Patch directory for branch \"$newbranch\" already exists."
33 cat "$applied" |
while read n
; do
34 git update-ref
"refs/patches/$newbranch/$n" \
35 `git rev-parse "refs/patches/$branch/$n"` ""
38 git branch
"$newbranch"
39 git checkout
"$newbranch"
41 mkdir
-p "$GUILT_DIR/`dirname $newbranch`"
44 cp_a
"$GUILT_DIR/$branch" "$GUILT_DIR/$newbranch"