Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 44 lines (31 sloc) 0.783 kb
#!/bin/sh
#
# Copyright (c) Josef "Jeff" Sipek, 2007-2008
#
USAGE="[<new_name>]"
. `dirname $0`/guilt
if [ $# -gt 1 ]; then
usage
fi
# make sure that there are no unapplied changes
if ! must_commit_first; then
die "Uncommited changes detected. Refresh first."
fi
if [ $# -eq 0 ]; then
newbranch="$branch-`date +%Y-%m-%d`"
else
newbranch="$1"
fi
if [ -e "$GUILT_DIR/$newbranch" ]; then
die "Patch directory for branch \"$newbranch\" already exists."
fi
cat "$applied" | while read n; do
git update-ref "refs/patches/$newbranch/$n" \
`git rev-parse "refs/patches/$branch/$n"` ""
done
git branch "$newbranch"
git checkout "$newbranch"
mkdir -p "$GUILT_DIR/`dirname $newbranch`"
# copy the patch dir
cp -a "$GUILT_DIR/$branch" "$GUILT_DIR/$newbranch"
# copy the refs
Jump to Line
Something went wrong with that request. Please try again.