A short cut to show the history of a named topgit branch. Additional options
to git log can be given after a '--'.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
/tg-info.txt
/tg-mail
/tg-mail.txt
/tg-info.txt
/tg-mail
/tg-mail.txt
/tg-patch
/tg-patch.txt
/tg-push
/tg-patch
/tg-patch.txt
/tg-push
repository, so you will not see work done by your
collaborators.)
repository, so you will not see work done by your
collaborators.)
+tg log
+~~~~~~
+ Prints the git log of the named topgit branch.
+_tg_log ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+
+ case "$cur" in
+ *)
+ __tgcomp "$(__tg_topics)"
+ esac
+}
+
_tg_mail ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
_tg_mail ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
help) _tg_help ;;
import) _tg_import ;;
info) _tg_info ;;
help) _tg_help ;;
import) _tg_import ;;
info) _tg_info ;;
mail) _tg_mail ;;
patch) _tg_patch ;;
push) _tg_push ;;
mail) _tg_mail ;;
patch) _tg_patch ;;
push) _tg_push ;;
--- /dev/null
+#!/bin/sh
+# TopGit - A different patch queue manager
+# (c) Petr Baudis <pasky@suse.cz> 2008
+# (c) Bert Wesarg <Bert.Wesarg@googlemail.com> 2009
+# GPLv2
+
+name=
+
+
+## Parse options
+
+while [ -n "$1" ]; do
+ arg="$1"; shift
+ case "$arg" in
+ --)
+ break;;
+ -*)
+ echo "Usage: tg [...] log [NAME] [-- GIT LOG OPTIONS...]" >&2
+ exit 1;;
+ *)
+ [ -z "$name" ] || die "name already specified ($name)"
+ name="$arg";;
+ esac
+done
+
+[ -n "$name" ] || name="$(git symbolic-ref HEAD | sed 's#^refs/heads/##')"
+base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
+ die "not a TopGit-controlled branch"
+
+git log --first-parent --no-merges "$@" "refs/top-bases/$name".."$name"