2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
4 # (c) Bert Wesarg <Bert.Wesarg@googlemail.com> 2009
23 echo "Usage: ${tgname:-tg} [...] log [<name>] [--] [<git-log-option>...]" >&2
26 if test="$(verify_topgit_branch "$arg" -f)"; then
27 [ -z "$name" ] || die
"name already specified ($name)"
33 [ -z "$name" ] || die
"name already specified ($name)"
39 name
="$(verify_topgit_branch "${name:-HEAD}")"
40 base_rev
="$(git rev-parse --short --verify "refs
/$topbases/$name" -- 2>/dev/null)" ||
41 die
"not a TopGit-controlled branch"
45 [ "$a" != "--" ] ||
{ hasdd
=1; break; }
47 if [ -z "$hasdd" ]; then
48 git log
--first-parent --no-merges "$@" "refs/$topbases/$name"..
"$name"
50 cmd
='git log --first-parent --no-merges'
51 while [ $# -gt 0 -a "$1" != "--" ]; do
52 cmd
="$cmd $(quotearg "$1")"
55 cmd
="$cmd $(quotearg "refs
/$topbases/$name".."$name")"
56 while [ $# -gt 0 ]; do
57 cmd
="$cmd $(quotearg "$1")"