diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2018-10-31 10:15:56 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-01 12:08:06 +0900 |
commit | 4d010a757c40d6e6e478354991bd052ef30cb853 (patch) | |
tree | 474b5f55bdcf47203a50ea4abad396353a15a1d7 /LGPL-2.1 | |
parent | add read_author_script() to libgit (diff) | |
download | tgif-4d010a757c40d6e6e478354991bd052ef30cb853.tar.xz |
sequencer: use read_author_script()
Use the new function added in the last commit to read the author
script, updating read_env_script() and read_author_ident(). We now
have a single code path that reads the author script for am and all
flavors of rebase. This changes the behavior of read_env_script() as
previously it would set any environment variables that were in the
author-script file. Now it is an error if the file contains other
variables or any of GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL and
GIT_AUTHOR_DATE are missing. This is what am and the non interactive
version of rebase have been doing for several years so hopefully it
will not cause a problem for interactive rebase users. The advantage
is that we are reusing existing code from am which uses sq_dequote()
to properly dequote variables. This fixes potential problems with user
edited scripts as read_env_script() which did not track quotes
properly.
This commit also removes the fallback code for checking for a broken
author script after git is upgraded when a rebase is stopped. Now that
the parsing uses sq_dequote() it will reliably return an error if the
quoting is broken and the user will have to abort the rebase and
restart. This isn't ideal but it's a corner case and the detection of
the broken quoting could be confused by user edited author scripts.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'LGPL-2.1')
0 files changed, 0 insertions, 0 deletions