commit: eeeee76cae467df4fe18ee49b9d53bfa2badd671 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Nov 9 07:24:14 2015 +0000 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> CommitDate: Sun Nov 22 20:57:35 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=eeeee76c
egencache --update-changelogs: Respect GIT_DIR Allow generating ChangeLogs from external git checkout via using GIT_DIR, rather than requiring the repository to be git. Note: zmedico's suggestion to drop the chdir included. X-URL: https://archives.gentoo.org/gentoo-portage-dev/message/181d99a68918ef659d5947b27c3ff322 X-URL: https://archives.gentoo.org/gentoo-portage-dev/message/24c479a4e994c5d896526a0f65f3db46 Acked-by: Zac Medico <zmedico <AT> gentoo.org> Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> bin/egencache | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/egencache b/bin/egencache index 1cc2f3d..caf6613 100755 --- a/bin/egencache +++ b/bin/egencache @@ -75,8 +75,6 @@ else: else: from repoman.metadata import parse_metadata_use -from repoman.vcs.vcs import FindVCS - if sys.hexversion >= 0x3000000: # pylint: disable=W0622 long = int @@ -920,9 +918,7 @@ class GenChangeLogs(object): output.close() def _task_iter(self): - os.chdir(self._repo_path) - - if 'git' not in FindVCS(): + if not os.path.isdir(os.environ.get('GIT_DIR', os.path.join(repo_path, '.git'))): writemsg_level( "ERROR: --update-changelogs supported only in git repos\n", level=logging.ERROR, noiselevel=-1)
