diff --git a/kas/plugins/for_all_repos.py b/kas/plugins/for_all_repos.py index 2581ae7..b720eb2 100644 --- a/kas/plugins/for_all_repos.py +++ b/kas/plugins/for_all_repos.py @@ -48,9 +48,19 @@ * ``KAS_REPO_URL``: The URL from which this repository was cloned, or an empty string if no remote URL was given in the config file. + * ``KAS_REPO_COMMIT``: The commit ID which was checked out for this + repository, or an empty string if no commit was given in the config + file. + + * ``KAS_REPO_BRANCH``: The branch which was checked out for this + repository, or an empty string if no branch was given in the config + file. + * ``KAS_REPO_REFSPEC``: The refspec which was checked out for this repository, or an empty string if no refspec was given in the config - file. + file. This variable is obsolete and will be removed when support for + respec keys is removed as well. Migrate your repos to commit/branch + and use the related variables instead. """ import logging @@ -107,6 +117,8 @@ class ForAllReposCommand(Command): 'KAS_REPO_NAME': repo.name, 'KAS_REPO_PATH': repo.path, 'KAS_REPO_URL': '' if repo.operations_disabled else repo.url, + 'KAS_REPO_COMMIT': repo.commit or '', + 'KAS_REPO_BRANCH': repo.branch or '', 'KAS_REPO_REFSPEC': repo.refspec or '', } logging.info('%s$ %s', repo.path, self.command)