squash! rebase -i: remove no-op do_with_author git commit --amend

rebase -i: remove no-op do_with_author git commit --amend

introduced when squash was implement in terms of git-reset
no-op with --amend
if we decide to support arbitrary authors for replayed commits in the
future author_script might be useful again
squash! rebase -i: teach do_pick the option --reset-author

rebase -i: teach do_pick the option --reset-author

`do_pick` is the git-cherry-pick wrapper in git-rebase--interactive
that is used to implement many of the to-do list commands.
Eventually, the complete `do_pick` interface will be exposed to the
user in some form or another and those commands will become simple
aliases for the `do_pick` options now used to implement them.

Add the git-commit option `--reset-author` to the options pool of
`do_pick`. It rewrites the author date and name of the picked commit
to match the committer date and name.

If `--reset-author` is passed to `do_pick`, set the `rewrite` flag
and relay the option to the git-commit command line which creates the
final commit. If `--amend` is not passed as well, the fresh
authorship effect is achieved by the mere fact that we are creating a
new commit. Do not even source the ident information in that case
because the user shell might have already exported the respective
environment variables.
squash! rebase -i: do not overwrite user author information

rebase -i: do not overwrite user author information

The shell function `get_author_ident_from_commit` defined by
git-sh-setup retrieves the author information from the named commit
and returns assignments of the environment variables

    GIT_AUTHOR_NAME
    GIT_AUTHOR_EMAIL
    GIT_AUTHOR_DATE

ready for evaluatation by the shell.

This interface has two use cases in git-rebase--interactive.

Firstly, the so-called author script is a git-rebase--interactive
state file that contains the `get_author_ident_from_commit` output.
It is sourced when `git rebase --continue` is executed after conflict
resolution to retain the original commit authorship.

Secondly, `get_author_ident_from_commit` is used to build squash
commits. Because squash commits carry the authorship of the first
commit mentioned in the series, the function is used to retrieve the
author information of that commit and letting the shell assign it to
the environment variables mentioned above using `eval`.

In both cases, the variable assignments are only exported in the
subshells that execute the git-commit command lines for creating the
respective commits. This is taken care of by wrapping the git-commit
call in `do_with_author`. However, this is not enough protection from
modifying the git environment variables unintentionally because the
user running git-rebase could have already exported those herself.
And therefore, a bare git-commit could result in an authorship that
is neither intended by the user nor by git-rebase--interactive.

While it is not an issue now (either `do_with_author`,
git-cherry-pick or `--amend` is used), the unnecessary loss of the
author information environment copied from the user shell and the
unneeded fixing of the author date might become a problem when we
decide to support something similar to `--ignore-date` or
`--reset-author` in interactive git-rebase.

Do not assign the git environment variables until in the
`do_with_author` subshell. The afor
squash! rebase -i: enable options --signoff, --reset-author for pick, reword

rebase -i: enable --signoff, --reset-author for pick, reword, edit

Lift the general unknown option blockade for the `pick`, `reword` and
`edit` commands. If `do_cmd` comes across one of the options
`--signoff` and `--reset-author` while parsing a to-do entry and the
scheduled command is either `pick` or `reword`, relay the option to
`do_pick`.

Remember to add Signed-off-by: and to reset the authorship even when
the rebase is interrupted for conflict resolution and `git rebase
--continue` creates the commit. Employ the same mechanism that is
used to remember amending an interim squash commit after conflict
resolution or a commit after editing. If a line option was specified,
create the files `signoff` and `resetauthor` respectively in the
state directory. Also remember the new parent's hash and refuse to
create a commit if the user has created commits on top of where we
were when the rebase was interrupted. We are using a single file
`last_head` for this purpose from now so that we have to carry out
the check whether the head was moved just once.

While `signoff` is handled by simply specifying the `--signoff`
option when creating the commit, the `resetauthor` case is somewhat
more involved. The author script contains either the ident
information of the replayed commit or the one of the squash commit.
Renewing the authorship means using the user environment for the
authorship so that we need to skip the author script if `resetauthor`
exists and we are not amending. If we are amending, `--reset-author`
must be passed to git-commit because otherwise the authorship of HEAD
would be used.

`do_pick` options like `--gpg-sign` and `--file` are not yet
supported because `do_cmd` cannot handle option arguments and options
with spaces at the moment. `squash` and `fixup` still do not accept
user options as the interplay of `--reset-author` and the author
script is yet to be determined.

Document the new options by listing them in the to-do help and giving
a usage example in the "INTERACTIVE MODE" section of the git-rebase
man page.

Add tests.