git: upgraded package to upstream

Upgraded dev-vcs/git to version 2.21.0 on amd64

BUG=chromium:991071
TEST=Built package for an overlay that has a CROS_WORKON_COMMIT

Change-Id: I5474926aa39ddcbadd9f4c38b02d9ab529a943e9
Reviewed-on: https://chromium-review.googlesource.com/1737170
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
index 942b275..f0aec64 100644
--- a/dev-vcs/git/Manifest
+++ b/dev-vcs/git/Manifest
@@ -1,3 +1,3 @@
-DIST git-2.20.1.tar.xz 5359872 BLAKE2B f7eb640f179837687b2b343d8a3a03d7d0fa60ca17e28dc5637a75800752d0e02be4c535dc4c3be6f25020aa419f22aa6855c641b06c61ebf45e0c51de069262 SHA512 3f05ea3a645d4d74c7380b03e2de39f893ff77a05d8b595ce30300d1d4e032f11d84952366096f8effd5fba18dfa5ebb946bc07a984eb7cbbda113cb88202f6c
-DIST git-htmldocs-2.20.1.tar.xz 1227884 BLAKE2B 2e3b5e888d187cc7563a36d9b0c43118fbc50ddf9ca65a98319f563ff226e1f9829d578f578619e04d9576eae95631188973484aa758a9706a7a08261e0a16ad SHA512 aae04a8a42865a855d699d445d2fbed657aecce8d090a36e171c6cf260175102fe2314142f3b59d200460560b413698fb263e77cadae49171bff50b96edb6d63
-DIST git-manpages-2.20.1.tar.xz 439172 BLAKE2B c1c7a3031d600e53451ff2c35b00a541dfc09554b47567c4bfa8410d891dbd98c2ff28cbff5deff21e74c1c92eaa70777013e23bae6a484ba1690bbefc1740fa SHA512 43ab28063b896062727ced8aa64119daebef261c5b393cec112fe9872955a165abc3d91f75f6e273d60b15f3c49eba44dfc7591ede452cfee8362f7d5f39c5f7
+DIST git-2.21.0.tar.xz 5491296 BLAKE2B c5e66f4d4045f99bb4306e8f096ae9299908383df78bdf2a954cd415f4778eb59ea0ee7d501689313617de7dc1d2ee4ae15ab70dee564add5de877109073ddff SHA512 83f57c3950a07f6773a3aea66611d22daba0e5599e5d8f0751a16f6fdbeab0f3844d942a39a5642051212df99d1d4513253c36829b1454b4f0977cc6026fd973
+DIST git-htmldocs-2.21.0.tar.xz 1234956 BLAKE2B d8ef32acbad7eeb8758f711e09c380dbf3ca72526067b3a86ed0865e37351c4fac1f0c7e845e7b0c27a1d955c64622f10c999389446b53191acdc05a44647847 SHA512 4537b3f67d03050e5daefaa6f274d3acdf6e116dc8c7f76566b33100e76a445c3e3894b5ff63b5ddb024e1c691a3bf08acea42dbec681da1b0f1de2e5736c9c4
+DIST git-manpages-2.21.0.tar.xz 440096 BLAKE2B 6cbedf6e497b0d13c62003b166293a0d438d163255bce845eaf75e08a3eec49060c314e73d24c1c015101868d9149e9b0cd1c2e8cb3ce2245b8acae5701fe8ba SHA512 61e01cd312dbade8aac0144e32edc5eea2708b274273c207889a291cea18d131c9c2d83cc405ba8a955d387fd1e6dd74b7bdae4003f2062501073a0844122d30
diff --git a/dev-vcs/git/files/git-2.21.0-quiet-submodules-testcase.patch b/dev-vcs/git/files/git-2.21.0-quiet-submodules-testcase.patch
new file mode 100644
index 0000000..0874ea9
--- /dev/null
+++ b/dev-vcs/git/files/git-2.21.0-quiet-submodules-testcase.patch
@@ -0,0 +1,38 @@
+From a57994f2d78134936521375ba9798a1b7418e230 Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Fri, 12 Apr 2019 00:00:07 -0700
+Subject: [PATCH] submodule foreach: test foreach option swallowing
+
+Add a testcase for submodule foreach option parsing not knowing where to
+stop taking options, and accidently removing options intended for
+foreach target commands.
+
+CC: Duy Nguyen <pclouds@gmail.com>
+CC: Prathamesh Chavan <pc44800@gmail.com>
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+---
+ t/t7407-submodule-foreach.sh | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
+index 77729ac4aa..706ae762e0 100755
+--- a/t/t7407-submodule-foreach.sh
++++ b/t/t7407-submodule-foreach.sh
+@@ -411,4 +411,14 @@ test_expect_success 'multi-argument command passed to foreach is not shell-evalu
+ 	test_cmp expected actual
+ '
+ 
++test_expect_success 'option-like arguments passed to foreach commands are not lost' '
++	(
++		cd super &&
++		git submodule foreach "echo be --quiet" > ../expected &&
++		git submodule foreach echo be --quiet > ../actual
++	) &&
++	grep -sq -e "--quiet" expected &&
++	test_cmp expected actual
++'
++
+ test_done
+-- 
+2.21.0
+
diff --git a/dev-vcs/git/files/git-2.21.0-quiet-submodules.patch b/dev-vcs/git/files/git-2.21.0-quiet-submodules.patch
new file mode 100644
index 0000000..adb0dfd
--- /dev/null
+++ b/dev-vcs/git/files/git-2.21.0-quiet-submodules.patch
@@ -0,0 +1,61 @@
+From git-owner@vger.kernel.org Wed Apr 10 11:18:40 2019
+Date: 10 Apr 2019 18:18:35 +0700
+Message-ID: <20190410111834.GA25638@ash>
+From: "Duy Nguyen" <pclouds@gmail.com>
+Sender: git-owner@vger.kernel.org
+Subject: Re: regression AGAIN in output of git-pull --rebase --recurse-submodules=yes --quiet
+References: <robbat2-20180120T054223-685328376Z@orbis-terrarum.net>
+ <robbat2-20190410T062730-540884809Z@orbis-terrarum.net>
+List-ID: <git.vger.kernel.org>
+
+...
+
+If you run this with GIT_TRACE=1, you can see that --quiet is passed
+to submodule--helper correctly.
+
+trace: built-in: git submodule--helper foreach --quiet git pull --quiet origin master
+
+The problem here is the option parser of this command would try to
+parse all options, so it considers both --quiet the same thing and are
+to tell "submodule--foreach" to be quiet, the second --quiet is not
+part of the "git pull" command anymore.
+
+So the fix would be to pass "--" to stop option parsing.
+submodule--helper should not parse options it does not understand
+anyway. Something like this should work.
+
+-- 8< --
+diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
+index 6bcc4f1bd7..6394222628 100644
+--- a/builtin/submodule--helper.c
++++ b/builtin/submodule--helper.c
+@@ -571,7 +571,7 @@ static int module_foreach(int argc, const char **argv, const char *prefix)
+ 	};
+ 
+ 	argc = parse_options(argc, argv, prefix, module_foreach_options,
+-			     git_submodule_helper_usage, PARSE_OPT_KEEP_UNKNOWN);
++			     git_submodule_helper_usage, 0);
+ 
+ 	if (module_list_compute(0, NULL, prefix, &pathspec, &list) < 0)
+ 		return 1;
+diff --git a/git-submodule.sh b/git-submodule.sh
+index 2c0fb6d723..a967b2890d 100755
+--- a/git-submodule.sh
++++ b/git-submodule.sh
+@@ -346,7 +346,7 @@ cmd_foreach()
+ 		shift
+ 	done
+ 
+-	git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper foreach ${GIT_QUIET:+--quiet} ${recursive:+--recursive} "$@"
++	git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper foreach ${GIT_QUIET:+--quiet} ${recursive:+--recursive} -- "$@"
+ }
+ 
+ #
+-- 8< --
+
+I'm a bit reluctant to follow up with a proper patch because I can't
+digest the t5572-submodule-pull.sh tests. And we definitely need to
+add a test case about --quiet to make sure it won't happen again.
+--
+Duy
+
diff --git a/dev-vcs/git/files/git-2.22.0_rc0-optional-cvs.patch b/dev-vcs/git/files/git-2.22.0_rc0-optional-cvs.patch
new file mode 100644
index 0000000..a7d7a78
--- /dev/null
+++ b/dev-vcs/git/files/git-2.22.0_rc0-optional-cvs.patch
@@ -0,0 +1,454 @@
+From 1d3a35734efa1a1778612bb60cbbb495f65d3fc0 Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robbat2@gentoo.org>
+Date: Tue, 14 May 2019 08:53:06 +0200
+Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
+ utilities
+
+Forward-ported from 1.7.12 to current git.git v1.8.4
+Forward-ported from v1.8.4 to v1.8.5.1
+Forward-ported from v1.8.5.3 to v1.9.0_rc3
+Forward-ported from 1.9.0_rc3 to current git.git v2.0.0_rc0
+Forward-ported from v2.0.0_rc0 to v2.0.0
+Forward-ported from v2.0.0 to v2.2.2
+Forward-ported from v2.2.2 to v2.8.4
+Forward-ported from v2.8.4 to v2.10.0
+Forward-ported from v2.10.0 to v2.12.0
+Forward-ported from v2.12.0 to v2.17.0-rc1
+Forward-ported from v2.17.0-rc1 to v2.18.0-rc1
+Forward-ported from v2.18.0-rc1 to v2.22.0-rc0
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ Makefile                           | 48 ++++++++++++++++++++++--------
+ t/t9200-git-cvsexportcommit.sh     |  5 ++++
+ t/t9400-git-cvsserver-server.sh    |  8 ++++-
+ t/t9401-git-cvsserver-crlf.sh      | 15 ++++++----
+ t/t9600-cvsimport.sh               | 41 +++++++++++++++----------
+ t/t9601-cvsimport-vendor-branch.sh | 11 +++++++
+ t/t9602-cvsimport-branches-tags.sh | 11 +++++++
+ t/t9603-cvsimport-patchsets.sh     | 11 +++++++
+ t/test-lib.sh                      |  1 +
+ 9 files changed, 118 insertions(+), 33 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f965509b3c..ab8b22faf1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -327,6 +327,8 @@ all::
+ # Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep
+ # and egrep that are pickier when their input contains non-ASCII data.
+ #
++# Define NO_CVS if you do not want any CVS interface utilities.
++#
+ # The TCL_PATH variable governs the location of the Tcl interpreter
+ # used to optimize git-gui for your system.  Only used if NO_TCLTK
+ # is not set.  Defaults to the bare 'tclsh'.
+@@ -597,6 +599,7 @@ PROGRAM_OBJS =
+ PROGRAMS =
+ EXCLUDED_PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -632,31 +635,33 @@ SCRIPT_LIB += git-sh-i18n
+ 
+ SCRIPT_PERL += git-add--interactive.perl
+ SCRIPT_PERL += git-archimport.perl
+-SCRIPT_PERL += git-cvsexportcommit.perl
+-SCRIPT_PERL += git-cvsimport.perl
+-SCRIPT_PERL += git-cvsserver.perl
+ SCRIPT_PERL += git-send-email.perl
+ SCRIPT_PERL += git-svn.perl
+ 
++SCRIPT_PERL_CVS += git-cvsexportcommit.perl
++SCRIPT_PERL_CVS += git-cvsimport.perl
++SCRIPT_PERL_CVS += git-cvsserver.perl
++
+ SCRIPT_PYTHON += git-p4.py
+ 
+ # Generated files for scripts
+ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+ SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
++SCRIPT_PERL_CVS_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL_CVS))
+ SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
+ 
+ # Individual rules to allow e.g.
+ # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
+ # from subdirectories like contrib/*/
+ .PHONY: build-perl-script build-sh-script build-python-script
+-build-perl-script: $(SCRIPT_PERL_GEN)
++build-perl-script: $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
+ build-sh-script: $(SCRIPT_SH_GEN)
+ build-python-script: $(SCRIPT_PYTHON_GEN)
+ 
+ .PHONY: install-perl-script install-sh-script install-python-script
+ install-sh-script: $(SCRIPT_SH_GEN)
+ 	$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+-install-perl-script: $(SCRIPT_PERL_GEN)
++install-perl-script: $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
+ 	$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+ install-python-script: $(SCRIPT_PYTHON_GEN)
+ 	$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+@@ -665,12 +670,13 @@ install-python-script: $(SCRIPT_PYTHON_GEN)
+ clean-sh-script:
+ 	$(RM) $(SCRIPT_SH_GEN)
+ clean-perl-script:
+-	$(RM) $(SCRIPT_PERL_GEN)
++	$(RM) $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
+ clean-python-script:
+ 	$(RM) $(SCRIPT_PYTHON_GEN)
+ 
+ SCRIPTS = $(SCRIPT_SH_GEN) \
+ 	  $(SCRIPT_PERL_GEN) \
++	  $(SCRIPT_PERL_CVS_GEN) \
+ 	  $(SCRIPT_PYTHON_GEN) \
+ 	  git-instaweb
+ 
+@@ -2189,13 +2195,27 @@ git.res: git.rc GIT-VERSION-FILE GIT-PREFIX
+ 	  -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@
+ 
+ # This makes sure we depend on the NO_PERL setting itself.
+-$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
++$(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN): GIT-BUILD-OPTIONS
++
++_SCRIPT_PERL_GEN =
++_SCRIPT_PERL_NOGEN =
+ 
+ # Used for substitution in Perl modules. Disabled when using RUNTIME_PREFIX
+ # since the locale directory is injected.
+ perl_localedir_SQ = $(localedir_SQ)
+ 
+ ifndef NO_PERL
++_SCRIPT_PERL_GEN = $(SCRIPT_PERL_GEN)
++
++ifndef NO_CVS
++_SCRIPT_PERL_GEN += $(SCRIPT_PERL_CVS_GEN)
++else
++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_CVS_GEN)
++_REASON = NO_CVS
++_REASON_CONTENT = $(NO_CVS)
++endif # NO_CVS
++
++$(_SCRIPT_PERL_GEN):
+ PERL_HEADER_TEMPLATE = perl/header_templates/fixed_prefix.template.pl
+ PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
+ 
+@@ -2216,7 +2236,7 @@ endif
+ 
+ PERL_DEFINES += $(gitexecdir) $(perllibdir) $(localedir)
+ 
+-$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
++$(_SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
+ 	$(QUIET_GEN)$(RM) $@ $@+ && \
+ 	sed -e '1{' \
+ 	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
+@@ -2262,14 +2282,18 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES
+ 	chmod +x $@+ && \
+ 	mv $@+ $@
+ else # NO_PERL
+-$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN) git-instaweb
++_REASON = NO_PERL
++_REASON_CONTENT = $(NO_PERL)
++endif # NO_PERL
++
++$(_SCRIPT_PERL_NOGEN): % : unimplemented.sh
+ 	$(QUIET_GEN)$(RM) $@ $@+ && \
+ 	sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+-	    -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
++	    -e 's|@@REASON@@|$(_REASON)=$(_REASON_CONTENT)|g' \
+ 	    unimplemented.sh >$@+ && \
+ 	chmod +x $@+ && \
+ 	mv $@+ $@
+-endif # NO_PERL
+ 
+ # This makes sure we depend on the NO_PYTHON setting itself.
+ $(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
+@@ -2518,7 +2542,7 @@ LOCALIZED_SH = $(SCRIPT_SH)
+ LOCALIZED_SH += git-parse-remote.sh
+ LOCALIZED_SH += git-rebase--preserve-merges.sh
+ LOCALIZED_SH += git-sh-setup.sh
+-LOCALIZED_PERL = $(SCRIPT_PERL)
++LOCALIZED_PERL = $(SCRIPT_PERL) $(SCRIPT_PERL_CVS)
+ 
+ ifdef XGETTEXT_INCLUDE_TESTS
+ LOCALIZED_C += t/t0200/test.c
+diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
+index c5946cb0b8..223fd5409b 100755
+--- a/t/t9200-git-cvsexportcommit.sh
++++ b/t/t9200-git-cvsexportcommit.sh
+@@ -11,6 +11,11 @@ if ! test_have_prereq PERL; then
+ 	test_done
+ fi
+ 
++if ! test_have_prereq CVS; then
++	skip_all='skipping git cvsexportcommit tests, cvs not available'
++	test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
+index a5e5dca753..ef6d9c911c 100755
+--- a/t/t9400-git-cvsserver-server.sh
++++ b/t/t9400-git-cvsserver-server.sh
+@@ -11,9 +11,15 @@ cvs CLI client via git-cvsserver server'
+ . ./test-lib.sh
+ 
+ if ! test_have_prereq PERL; then
+-	skip_all='skipping git cvsserver tests, perl not available'
++	skip_all='skipping git-cvsserver tests, perl not available'
+ 	test_done
+ fi
++
++if ! test_have_prereq CVS; then
++	skip_all='skipping git-cvsserver tests, cvs not available'
++	test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
+index 84787eee9a..eecba88527 100755
+--- a/t/t9401-git-cvsserver-crlf.sh
++++ b/t/t9401-git-cvsserver-crlf.sh
+@@ -57,15 +57,20 @@ check_status_options() {
+     return $stat
+ }
+ 
+-cvs >/dev/null 2>&1
+-if test $? -ne 1
++if ! test_have_prereq PERL
+ then
+-    skip_all='skipping git-cvsserver tests, cvs not found'
++    skip_all='skipping git-cvsserver tests, perl not available'
+     test_done
+ fi
+-if ! test_have_prereq PERL
++if ! test_have_prereq CVS
+ then
+-    skip_all='skipping git-cvsserver tests, perl not available'
++    skip_all='skipping git-cvsserver tests, cvs not available'
++    test_done
++fi
++cvs >/dev/null 2>&1
++if test $? -ne 1
++then
++    skip_all='skipping git-cvsserver tests, cvs not found'
+     test_done
+ fi
+ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
+index 251fdd66c4..596cd9d35d 100755
+--- a/t/t9600-cvsimport.sh
++++ b/t/t9600-cvsimport.sh
+@@ -8,14 +8,25 @@ if ! test_have_prereq NOT_ROOT; then
+ 	test_done
+ fi
+ 
+-test_expect_success PERL 'setup cvsroot environment' '
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
++test_expect_success 'setup cvsroot environment' '
+ 	CVSROOT=$(pwd)/cvsroot &&
+ 	export CVSROOT
+ '
+ 
+-test_expect_success PERL 'setup cvsroot' '$CVS init'
++test_expect_success 'setup cvsroot' '$CVS init'
+ 
+-test_expect_success PERL 'setup a cvs module' '
++test_expect_success 'setup a cvs module' '
+ 
+ 	mkdir "$CVSROOT/module" &&
+ 	$CVS co -d module-cvs module &&
+@@ -47,23 +58,23 @@ EOF
+ 	)
+ '
+ 
+-test_expect_success PERL 'import a trivial module' '
++test_expect_success 'import a trivial module' '
+ 
+ 	git cvsimport -a -R -z 0 -C module-git module &&
+ 	test_cmp module-cvs/o_fortuna module-git/o_fortuna
+ 
+ '
+ 
+-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
++test_expect_success 'pack refs' '(cd module-git && git gc)'
+ 
+-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
++test_expect_success 'initial import has correct .git/cvs-revisions' '
+ 
+ 	(cd module-git &&
+ 	 git log --format="o_fortuna 1.1 %H" -1) > expected &&
+ 	test_cmp expected module-git/.git/cvs-revisions
+ '
+ 
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+ 	(cd module-cvs &&
+ 	cat <<EOF >o_fortuna &&
+ O Fortune,
+@@ -91,7 +102,7 @@ EOF
+ 	)
+ '
+ 
+-test_expect_success PERL 'update git module' '
++test_expect_success 'update git module' '
+ 
+ 	(cd module-git &&
+ 	git config cvsimport.trackRevisions true &&
+@@ -102,7 +113,7 @@ test_expect_success PERL 'update git module' '
+ 
+ '
+ 
+-test_expect_success PERL 'update has correct .git/cvs-revisions' '
++test_expect_success 'update has correct .git/cvs-revisions' '
+ 
+ 	(cd module-git &&
+ 	 git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
+@@ -110,7 +121,7 @@ test_expect_success PERL 'update has correct .git/cvs-revisions' '
+ 	test_cmp expected module-git/.git/cvs-revisions
+ '
+ 
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+ 
+ 	(cd module-cvs &&
+ 		echo 1 >tick &&
+@@ -119,7 +130,7 @@ test_expect_success PERL 'update cvs module' '
+ 	)
+ '
+ 
+-test_expect_success PERL 'cvsimport.module config works' '
++test_expect_success 'cvsimport.module config works' '
+ 
+ 	(cd module-git &&
+ 		git config cvsimport.module module &&
+@@ -131,7 +142,7 @@ test_expect_success PERL 'cvsimport.module config works' '
+ 
+ '
+ 
+-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
++test_expect_success 'second update has correct .git/cvs-revisions' '
+ 
+ 	(cd module-git &&
+ 	 git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
+@@ -140,7 +151,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '
+ 	test_cmp expected module-git/.git/cvs-revisions
+ '
+ 
+-test_expect_success PERL 'import from a CVS working tree' '
++test_expect_success 'import from a CVS working tree' '
+ 
+ 	$CVS co -d import-from-wt module &&
+ 	(cd import-from-wt &&
+@@ -153,12 +164,12 @@ test_expect_success PERL 'import from a CVS working tree' '
+ 
+ '
+ 
+-test_expect_success PERL 'no .git/cvs-revisions created by default' '
++test_expect_success 'no .git/cvs-revisions created by default' '
+ 
+ 	! test -e import-from-wt/.git/cvs-revisions
+ 
+ '
+ 
+-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
+ 
+ test_done
+diff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh
+index 827d39f5bf..d730a41f67 100755
+--- a/t/t9601-cvsimport-vendor-branch.sh
++++ b/t/t9601-cvsimport-vendor-branch.sh
+@@ -34,6 +34,17 @@
+ test_description='git cvsimport handling of vendor branches'
+ . ./lib-cvs.sh
+ 
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
+ setup_cvs_test_repository t9601
+ 
+ test_expect_success PERL 'import a module with a vendor branch' '
+diff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh
+index e1db323f54..68f097401f 100755
+--- a/t/t9602-cvsimport-branches-tags.sh
++++ b/t/t9602-cvsimport-branches-tags.sh
+@@ -6,6 +6,17 @@
+ test_description='git cvsimport handling of branches and tags'
+ . ./lib-cvs.sh
+ 
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
+ setup_cvs_test_repository t9602
+ 
+ test_expect_success PERL 'import module' '
+diff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh
+index 3e64b11eac..606980b05c 100755
+--- a/t/t9603-cvsimport-patchsets.sh
++++ b/t/t9603-cvsimport-patchsets.sh
+@@ -14,6 +14,17 @@
+ test_description='git cvsimport testing for correct patchset estimation'
+ . ./lib-cvs.sh
+ 
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
+ setup_cvs_test_repository t9603
+ 
+ test_expect_failure PERL 'import with criss cross times on revisions' '
+diff --git a/t/test-lib.sh b/t/test-lib.sh
+index 908ddb9c46..9a06440599 100644
+--- a/t/test-lib.sh
++++ b/t/test-lib.sh
+@@ -1428,6 +1428,7 @@ case $uname_s in
+ esac
+ 
+ ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
++test -z "$NO_CVS" && test_set_prereq CVS
+ test -z "$NO_PERL" && test_set_prereq PERL
+ test -z "$NO_PTHREADS" && test_set_prereq PTHREADS
+ test -z "$NO_PYTHON" && test_set_prereq PYTHON
+-- 
+2.21.0
+
diff --git a/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch b/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch
deleted file mode 100644
index a874236..0000000
--- a/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naurp git-2.5.1.orig/config.mak.uname git-2.5.1/config.mak.uname
---- git-2.5.1.orig/config.mak.uname	2015-08-28 15:37:13.000000000 -0400
-+++ git-2.5.1/config.mak.uname	2015-09-06 18:54:28.538437000 -0400
-@@ -189,7 +189,9 @@ ifeq ($(uname_O),Cygwin)
- 	SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
- endif
- ifeq ($(uname_S),FreeBSD)
--	NEEDS_LIBICONV = YesPlease
-+	ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2)
-+		NEEDS_LIBICONV = YesPlease
-+	endif
- 	OLD_ICONV = YesPlease
- 	NO_MEMMEM = YesPlease
- 	BASIC_CFLAGS += -I/usr/local/include
diff --git a/dev-vcs/git/git-2.20.1.ebuild b/dev-vcs/git/git-2.21.0.ebuild
similarity index 94%
rename from dev-vcs/git/git-2.20.1.ebuild
rename to dev-vcs/git/git-2.21.0.ebuild
index b4b78db..7ada23c 100644
--- a/dev-vcs/git/git-2.20.1.ebuild
+++ b/dev-vcs/git/git-2.21.0.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 
 GENTOO_DEPEND_ON_PERL=no
 
@@ -26,7 +26,7 @@
 	esac
 fi
 
-inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
 
 MY_PV="${PV/_rc/.rc}"
 MY_P="${PN}-${MY_PV}"
@@ -69,6 +69,7 @@
 		webdav? ( dev-libs/expat )
 	)
 	emacs? ( virtual/emacs )
+	iconv? ( virtual/libiconv )
 "
 
 RDEPEND="${CDEPEND}
@@ -76,7 +77,6 @@
 	perl? (
 		dev-perl/Error
 		dev-perl/MailTools
-		dev-perl/Net-SMTP-SSL
 		dev-perl/Authen-SASL
 		cgi? (
 			dev-perl/CGI
@@ -165,7 +165,7 @@
 		$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
 		$(usex python '' NO_PYTHON=YesPlease)
 		$(usex subversion '' NO_SVN_TESTS=YesPlease)
-		$(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease)
+		$(usex threads '' NO_PTHREAD=YesPlease)
 		$(usex tk '' NO_TCLTK=YesPlease)
 	)
 
@@ -194,7 +194,7 @@
 	)
 
 	# For svn-fe
-	extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+	extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
 
 	# can't define this to null, since the entire makefile depends on it
 	sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
@@ -202,13 +202,13 @@
 	if use pcre; then
 		if use pcre-jit; then
 			myopts+=( USE_LIBPCRE2=YesPlease )
-			extlibs+=" -lpcre2-8"
+			extlibs+=( -lpcre2-8 )
 		else
 			myopts+=(
 				USE_LIBPCRE1=YesPlease
 				NO_LIBPCRE1_JIT=YesPlease
 			)
-			extlibs+=" -lpcre"
+			extlibs+=( -lpcre )
 		fi
 	fi
 # Disabled until ~m68k-mint can be keyworded again
@@ -233,7 +233,7 @@
 			NEEDS_LIBICONV=YesPlease
 			HAVE_CLOCK_MONOTONIC=1
 		)
-		grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
+		grep -q getdelim "${ROOT%/}"/usr/include/stdio.h && \
 			myopts+=( HAVE_GETDELIM=1 )
 	fi
 
@@ -242,11 +242,13 @@
 
 	# Bug 290465:
 	# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
-	[[ "${CHOST}" == *-uclibc* ]] && \
+	if [[ "${CHOST}" == *-uclibc* ]] ; then
 		myopts+=( NO_NSEC=YesPlease )
+		use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
+	fi
 
 	export MY_MAKEOPTS="${myopts[@]}"
-	export EXTLIBS="${extlibs}"
+	export EXTLIBS="${extlibs[@]}"
 }
 
 src_unpack() {
@@ -300,7 +302,7 @@
 	emake ${MY_MAKEOPTS} \
 		prefix="${EPREFIX}"/usr \
 		htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
-		perllibdir="$(perl_get_raw_vendorlib)" \
+		perllibdir="$(use perl && perl_get_raw_vendorlib)" \
 		sysconfdir="${EPREFIX}"/etc \
 		DESTDIR="${D}" \
 		GIT_TEST_OPTS="--no-color" \
@@ -359,12 +361,14 @@
 		pushd contrib/svn-fe &>/dev/null || die
 		# by defining EXTLIBS we override the detection for libintl and
 		# libiconv, bug #516168
-		local nlsiconv=
-		use nls && use !elibc_glibc && nlsiconv+=" -lintl"
-		use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
-		git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+		local nlsiconv=()
+		use nls && use !elibc_glibc && nlsiconv+=( -lintl )
+		use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
+		git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
+			|| die "emake svn-fe failed"
 		if use doc ; then
-			git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+			git_emake svn-fe.{1,html} \
+				|| die "emake svn-fe.1 svn-fe.html failed"
 		fi
 		popd &>/dev/null || die
 	fi
@@ -407,6 +411,7 @@
 	find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
 	dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
 	use doc && dodir /usr/share/doc/${PF}/html
+	local d
 	for d in / /howto/ /technical/ ; do
 		docinto ${d}
 		dodoc Documentation${d}*.txt
@@ -432,7 +437,7 @@
 		#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
 		# don't add automatically to the load-path, so the sitefile
 		# can do a conditional loading
-		touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+		touch "${ED%/}${SITELISP}/${PN}/compat/.nosearch"
 		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
 	fi
 
@@ -515,6 +520,7 @@
 		stats
 		workdir
 	)
+	local i
 	for i in "${contrib_objects[@]}" ; do
 		cp -rf \
 			"${S}"/contrib/${i} \
@@ -535,7 +541,7 @@
 		newdoc  "${S}"/gitweb/README README.gitweb
 
 		for d in "${ED%/}"/usr/lib{,64}/perl5/ ; do
-			if test -d "$d" ; then find "$d" \
+			if test -d "${d}" ; then find "${d}" \
 				-name .packlist \
 				-delete || die
 			fi
diff --git a/metadata/md5-cache/dev-vcs/git-2.20.1 b/metadata/md5-cache/dev-vcs/git-2.20.1
deleted file mode 100644
index a806c57..0000000
--- a/metadata/md5-cache/dev-vcs/git-2.20.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test unpack
-DEPEND=gnome-keyring? ( app-crypt/libsecret ) !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:= ) sys-libs/zlib pcre? ( pcre-jit? ( dev-libs/libpcre2[jit(+)] ) !pcre-jit? ( dev-libs/libpcre ) ) perl? ( dev-lang/perl:=[-build(-)] ) tk? ( dev-lang/tk:0= ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) doc? ( app-text/asciidoc app-text/docbook2X sys-apps/texinfo app-text/xmlto ) nls? ( sys-devel/gettext ) test? ( app-crypt/gnupg ) virtual/pkgconfig
-DESCRIPTION=stupid content tracker: distributed VCS designed for speed and efficiency
-EAPI=5
-HOMEPAGE=https://www.git-scm.com/
-IUSE=+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test linguas_bg linguas_ca linguas_de linguas_es linguas_fr linguas_is linguas_it linguas_ko linguas_pt_PT linguas_ru linguas_sv linguas_vi linguas_zh_CN python_targets_python2_7
-KEYWORDS=*
-LICENSE=GPL-2
-RDEPEND=gnome-keyring? ( app-crypt/libsecret ) !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:= ) sys-libs/zlib pcre? ( pcre-jit? ( dev-libs/libpcre2[jit(+)] ) !pcre-jit? ( dev-libs/libpcre ) ) perl? ( dev-lang/perl:=[-build(-)] ) tk? ( dev-lang/tk:0= ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) gpg? ( app-crypt/gnupg ) perl? ( dev-perl/Error dev-perl/MailTools dev-perl/Net-SMTP-SSL dev-perl/Authen-SASL cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) ) cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite ) mediawiki? ( dev-perl/DateTime-Format-ISO8601 dev-perl/HTML-Tree dev-perl/MediaWiki-API ) subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] )
-REQUIRED_USE=cgi? ( perl ) cvs? ( perl ) mediawiki? ( perl ) mediawiki-experimental? ( mediawiki ) subversion? ( perl ) webdav? ( curl ) pcre-jit? ( pcre ) python? ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=mirror://kernel/software/scm/git/git-2.20.1.tar.xz mirror://kernel/software/scm/git/git-manpages-2.20.1.tar.xz doc? ( mirror://kernel/software/scm/git/git-htmldocs-2.20.1.tar.xz )
-_eclasses_=bash-completion-r1	47a7402d95930413ce25ba8d857339bb	elisp-common	3322f14f031ddc95feccd9089c9adc59	eutils	06133990e861be0fe60c2b428fd025d9	l10n	33bde4fb0cfd3a21a277b66bfd837e19	multilib	b2f01ad412baf81650c23fcf0975fa33	multiprocessing	e32940a7b2a9992ad217eccddb84d548	perl-functions	01e8c68d5a528bbcda4d3c60205983df	perl-module	863b35d127db98823d439f8d73c2d011	python-single-r1	3a0fc81f484bfdbd9c2b7448015a36e4	python-utils-r1	1a4f6b5e7fa7b8da3f7d9753118d10c5	systemd	8f5286f89e265842f5b5189666eae88b	toolchain-funcs	1e35303c63cd707f6c3422b4493d5607	unpacker	04385b0f181c42fa9c18ec0e31729d1f
-_md5_=e066db7cd1452b7ba98efabf804fd687
diff --git a/metadata/md5-cache/dev-vcs/git-2.21.0 b/metadata/md5-cache/dev-vcs/git-2.21.0
new file mode 100644
index 0000000..22d07a6
--- /dev/null
+++ b/metadata/md5-cache/dev-vcs/git-2.21.0
@@ -0,0 +1,14 @@
+DEFINED_PHASES=compile configure install postinst postrm prepare setup test unpack
+DEPEND=gnome-keyring? ( app-crypt/libsecret ) !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:= ) sys-libs/zlib pcre? ( pcre-jit? ( dev-libs/libpcre2[jit(+)] ) !pcre-jit? ( dev-libs/libpcre ) ) perl? ( dev-lang/perl:=[-build(-)] ) tk? ( dev-lang/tk:0= ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) iconv? ( virtual/libiconv ) doc? ( app-text/asciidoc app-text/docbook2X sys-apps/texinfo app-text/xmlto ) nls? ( sys-devel/gettext ) test? ( app-crypt/gnupg ) virtual/pkgconfig
+DESCRIPTION=stupid content tracker: distributed VCS designed for speed and efficiency
+EAPI=6
+HOMEPAGE=https://www.git-scm.com/
+IUSE=+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test linguas_bg linguas_ca linguas_de linguas_es linguas_fr linguas_is linguas_it linguas_ko linguas_pt_PT linguas_ru linguas_sv linguas_vi linguas_zh_CN python_targets_python2_7
+KEYWORDS=*
+LICENSE=GPL-2
+RDEPEND=gnome-keyring? ( app-crypt/libsecret ) !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:= ) sys-libs/zlib pcre? ( pcre-jit? ( dev-libs/libpcre2[jit(+)] ) !pcre-jit? ( dev-libs/libpcre ) ) perl? ( dev-lang/perl:=[-build(-)] ) tk? ( dev-lang/tk:0= ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) iconv? ( virtual/libiconv ) gpg? ( app-crypt/gnupg ) perl? ( dev-perl/Error dev-perl/MailTools dev-perl/Authen-SASL cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) ) cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite ) mediawiki? ( dev-perl/DateTime-Format-ISO8601 dev-perl/HTML-Tree dev-perl/MediaWiki-API ) subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] )
+REQUIRED_USE=cgi? ( perl ) cvs? ( perl ) mediawiki? ( perl ) mediawiki-experimental? ( mediawiki ) subversion? ( perl ) webdav? ( curl ) pcre-jit? ( pcre ) python? ( python_targets_python2_7 )
+SLOT=0
+SRC_URI=mirror://kernel/software/scm/git/git-2.21.0.tar.xz mirror://kernel/software/scm/git/git-manpages-2.21.0.tar.xz doc? ( mirror://kernel/software/scm/git/git-htmldocs-2.21.0.tar.xz )
+_eclasses_=bash-completion-r1	47a7402d95930413ce25ba8d857339bb	elisp-common	3322f14f031ddc95feccd9089c9adc59	l10n	33bde4fb0cfd3a21a277b66bfd837e19	multilib	b2f01ad412baf81650c23fcf0975fa33	multiprocessing	e32940a7b2a9992ad217eccddb84d548	perl-functions	01e8c68d5a528bbcda4d3c60205983df	perl-module	863b35d127db98823d439f8d73c2d011	python-single-r1	3a0fc81f484bfdbd9c2b7448015a36e4	python-utils-r1	1a4f6b5e7fa7b8da3f7d9753118d10c5	systemd	8f5286f89e265842f5b5189666eae88b	toolchain-funcs	1e35303c63cd707f6c3422b4493d5607
+_md5_=d70fe3f97ca6543745f750a7a0b142e4