graph: Remove graph cache after command terminates
[guilt.git] / guilt-init
blobfeacf95f021b9819138dbc38dd0542fe5bdb811a
1 #!/bin/bash
3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 DO_NOT_CHECK_BRANCH_EXISTENCE=1
8 USAGE="[-n]"
9 . guilt
11 autotag=1
13 while case $# in 0) break ;; esac; do
14 if [ "$1" = "-n" ]; then
15 autotag=0
16 shift
17 else
18 usage
20 done
22 if [ -d "$GUILT_DIR/$branch" ]; then
23 die "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
26 [ ! -d "$GUILT_DIR" ] && mkdir $GUILT_DIR
27 mkdir $GUILT_DIR/$branch
28 touch $GUILT_DIR/$branch/series
29 touch $GUILT_DIR/$branch/status
31 git-config --int --replace-all guilt.autotag $autotag