3 # Copyright (c) Josef "Jeff" Sipek, 2006
6 source "`dirname $0`/gq.lib"
8 export GIT_DIR
=`find_git_dir`
9 GQ_DIR
="$GIT_DIR/patches"
11 branch
=`get_branch_verify`
12 series
="$GQ_DIR/$branch/series"
13 applied
="$GQ_DIR/$branch/status"
16 [ $# -ne 0 ] && echo "Poping only top most patch..arguments ignored"
18 # make sure that there are no unapplied changes
19 if ! must_commit_first
; then
20 echo "Uncommited changes detected. Refresh first."
24 git
reset --hard HEAD^
26 echo "Poping `get_top`..."
28 head -n -1 < $applied > $applied.tmp
32 [ ! -z "$p" ] && echo "Now at $p." ||
echo "All patches popped."