tg-completion: complete options for `tg remote`
[topgit/kirr.git] / hooks / pre-commit.sh
blobda631856909dba5a7420ee402e583fbde892f68a
1 #!/bin/sh
2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
4 # GPLv2
7 ## Set up all the tg machinery
9 set -e
10 tg__include=1
11 tg_util() {
12 . "@bindir@"/tg
14 tg_util
17 ## Generally have fun
19 # Don't do anything on non-topgit branch
20 git rev-parse --verify "$(git symbolic-ref HEAD | sed 's/heads/top-bases/')" >/dev/null 2>&1 ||
21 exit 0
23 [ -s "$root_dir/.topdeps" ] ||
24 die ".topdeps is missing"
25 [ -s "$root_dir/.topmsg" ] ||
26 die ".topmsg is missing"
28 # TODO: Verify .topdeps for valid branch names and against cycles