tg-create: let format.signoff control adding of Signed-off-by

GIT manual stresses that adding of Signed-off-by should be explicit
user decision. Some projects do ask for no Signed-off-by lines. So
make sure it is added by tg-create.sh only when explicity requested
by user.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
tg.sh: check for removed branch in branch_annihilated

Check that branch was not deleted by external means; prevents
errors from further git commands due to non-existing refs.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
tg-export.sh: support tag objects as parent

Currently tg-export fails with

Collapsing u/quota-pull
fatal: 2770ca86dec8b9cc36bf50127e5aff7f29557e3c is not a valid 'commit' object

Check for and resolve tag objects for parent.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
tg-update: add -a support for all branches

Allow branch filtering by pattern (same as git-for-each-ref(1))

Return to original branch after all branches were processed. In case
of error stays on last branch being processed.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
Merge branch 'x' into github
tg-update: clarify that there could be multiple PATTERNs
tg-update: strip refs/top-bases/ from PATTERNs just in case
tg-delete: simplistic check for dependency on deleted branch
README: really update documentation
tg-update: document variables
tg: fix recursing with missing dependencies

In the following dependency chain:

t/1 => t/2 => t/3

with missing initial t/1 no error is was returned when attempting
to update t/3, because t/2 was assumed to be external origin that
does not need update.

Extend recurse_deps() API to inform driver about missing dependency
by setting $_dep_missing before calling.

Use it in branch_needs_update() to indicate missing deps by emitting
additional '!' and forcing tg-update.sh to recurse into parent and
fail due to missing dep. All other drivers were extended to check
for $_dep_missing and silently return (that is what happened anyway).

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
tg-update: allow skipping branch if recursion fails

This allows user to skip failed recursive update and continue
with current state. It makes it possible to continue after
missing depenndency (which was the silent default before).

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
tg-update: correctly return error for missing deps

Adding -a introduced following regression: no error was returned
after missing deps to allow continuing with next branch. This means
missing dependencies during recursion were ignored (althouth warning
was output). Always abort with error unless called with "-a";
recursive never does it.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
tg-update: check for detached state of current branch

Check that current branch is not detached if called "-a" so we
can return to it.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
Merge branch 'master' of git://github.com/arvidjaar/topgit