hooks/pre-commit: check for deps repetitions
[topgit/greenrd.git] / tg-log.sh
blob8a8d527bcf512a4465d2e093d8c104841728bbdc
1 #!/bin/sh
2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
4 # (c) Bert Wesarg <Bert.Wesarg@googlemail.com> 2009
5 # GPLv2
7 name=
10 ## Parse options
12 while [ -n "$1" ]; do
13 arg="$1"; shift
14 case "$arg" in
15 --)
16 break;;
17 -*)
18 echo "Usage: tg [...] log [NAME] [-- GIT LOG OPTIONS...]" >&2
19 exit 1;;
21 [ -z "$name" ] || die "name already specified ($name)"
22 name="$arg";;
23 esac
24 done
26 [ -n "$name" ] || name="$(git symbolic-ref HEAD | sed 's#^refs/heads/##')"
27 base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
28 die "not a TopGit-controlled branch"
30 git log --first-parent --no-merges "$@" "refs/top-bases/$name".."$name"