2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
7 ## Set up all the tg machinery
19 # Don't do anything on non-topgit branch
20 if head_=$(git symbolic-ref -q HEAD); then
23 git rev-parse -q --verify "refs/top-bases${head_#refs/heads}" >/dev/null || exit 0;;
34 local tree file ls_line type size
38 ls_line="$(git ls-tree --long "$tree" "$file")" ||
39 die "Can't ls tree for $file"
42 die "$file is missing"
44 # check for type and size
49 # check file is of type blob (file)
50 [ "x$type" = "xblob" ] ||
51 die "$file is not a file"
53 # check for positive size
55 die "$file has empty size"
58 tree=$(git write-tree) ||
59 die "Can't write tree"
61 check_topfile "$tree" ".topdeps"
62 check_topfile "$tree" ".topmsg"
64 # TODO: Verify .topdeps for valid branch names and against cycles