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)"
40 printf '%s' "$1" |
sed 's/\(['\''!]\)/'\'\\\\\\1\''/g'
43 name
="$(verify_topgit_branch "${name:-HEAD}")"
44 base_rev
="$(git rev-parse --short --verify "refs
/top-bases
/$name" 2>/dev/null)" ||
45 die
"not a TopGit-controlled branch"
49 [ "$a" != "--" ] ||
{ hasdd
=1; break; }
51 if [ -z "$hasdd" ]; then
52 git log
--first-parent --no-merges "$@" "refs/top-bases/$name"..
"$name"
54 cmd
='git log --first-parent --no-merges'
55 while [ $# -gt 0 -a "$1" != "--" ]; do
56 cmd
="$cmd '$(quotearg "$1")'"
59 cmd
="$cmd '$(quotearg "refs
/top-bases
/$name".."$name")'"
60 while [ $# -gt 0 ]; do
61 cmd
="$cmd '$(quotearg "$1")'"