2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
4 # (c) Bert Wesarg <Bert.Wesarg@googlemail.com> 2009
25 echo "Usage: ${tgname:-tg} [...] log [--compact] [<name>] [--] [<git-log-option>...]" >&2
28 logcmd
="log-compact";;
30 logcmd
="${arg#--command=}";;
32 if test="$(verify_topgit_branch "$arg" -f)"; then
33 [ -z "$name" ] || die
"name already specified ($name)"
39 [ -z "$name" ] || die
"name already specified ($name)"
45 name
="$(verify_topgit_branch "${name:-HEAD}")"
46 base_rev
="$(git rev-parse --short --verify "refs
/$topbases/$name^
0" -- 2>/dev/null)" ||
47 die
"not a TopGit-controlled branch"
48 depcnt
="$(git cat-file blob "refs
/heads
/$name:.topdeps
" 2>/dev/null | awk 'END {print NR}')"
50 [ "$depcnt" -gt 0 ] || nomerges
=
54 [ "$a" != "--" ] ||
{ hasdd
=1; break; }
56 if [ -z "$hasdd" ]; then
57 git
$logcmd --first-parent $nomerges "$@" "refs/$topbases/$name"..
"$name"
59 cmd
='git $logcmd --first-parent $nomerges'
60 while [ $# -gt 0 -a "$1" != "--" ]; do
61 cmd
="$cmd $(quotearg "$1")"
64 cmd
="$cmd $(quotearg "refs
/$topbases/$name".."$name")"
65 while [ $# -gt 0 ]; do
66 cmd
="$cmd $(quotearg "$1")"