tg-files: list files changed by the topic branch

this could also be a --name-only option to tg-patch. But I like the
similarity to 'quilt files'.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
README: clearify note describing short-comings of tg log

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
provide a global temporary directory

The standard procedure 'tmp=mktemp; trap "rm $tmp" 0' was broken with the
introduction of the pager. Which overwrites the trap itself to close and
remove the pager fifo.

Now tg provides a temp playground and all other temp files should be created
inside this directory and only this directory will be removed with the exit
trap. setup_pager still overwrites the trap, but keeps the rm command from
the global temp directory. To simplify this the new function get_temp() is
provided.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
cat_file: take -i/-w parameters

This changes the way how cat_file selects the source of the file. It
accepts an optional parameter which is either -i or -w and will react on this
instead of the branch name. tg-patch is updated accordingly and can now
accepts the current branch name as argument with -i or -w given.

cat_file was also broken for the worktree case when we are not in the top level.

Also, tg-patch allowed to be on the top-base branch, but -i and -w doesn't
make sense there too.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
tg-export: use pretty_tree -b for base

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
tg-files: simplify arg checking and add sanity check for -i/-w

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
branch_empty: use pretty_tree and therefore respect -i/-w

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
tg-patch: use pretty_tree and diff-tree to generate the patch

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
list_deps: accept -i/-w

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
tg-summary: accept -i/-w

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
tg-mail: accept -i/-w

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
tg-prev/tg-next: commands to explore dependencies

Two new commands to explore the dependencies of TopGit branches:

  a) tg prev [-i | -w] [NAME]
     outputs the dependencies of NAME

  b) tg next [-i | -w] [NAME]
     outputs branches which depends on NAME

Obviously, quilt next was the inspiration.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Merge commit 'index-wt~2' of git://repo.or.cz/topgit/bertw
Merge commit 'refs/top-bases/t/import-move-head' into t/import-move-head
Document new functionality