gq-push should exit with non-zero value if there are rejects & regression test for...
[guilt.git] / gq-init
bloba638b0aad9d189c64e6bd8427a1bb7452cc51572
1 #!/bin/bash
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`
13 if [ -d "$GQ_DIR/$branch" ]; then
14 echo "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
15 exit 1
18 [ ! -d "$GQ_DIR" ] && mkdir $GQ_DIR
19 mkdir $GQ_DIR/$branch
20 touch $GQ_DIR/$branch/series
21 touch $GQ_DIR/$branch/status