Common repository setup functionality.

Function set_user_name_and_email Undocumented
Function check_gitattributes Verify the treeish doesn’t contain non-empty .gitattributes files.
Variable dgit_attr_macro_re Undocumented
Variable dgit_attr_macro_defn Undocumented
Variable attr_glob_defns Undocumented
Function is_gitattributes_set_up No summary
Function setup_gitattributes Setup .git/info/attributes in a way to prevent transformations from interfering with packaging, because the working tree files can differ from the Git revision history (and from the source packages).
def set_user_name_and_email(repo_user, repo_email, repo):
Undocumented
def check_gitattributes(repo, treeish):

Verify the treeish doesn’t contain non-empty .gitattributes files.

dgit_attr_macro_re =
Undocumented
dgit_attr_macro_defn =
Undocumented
(type: str)
attr_glob_defns =
Undocumented
(type: Set[str])
def is_gitattributes_set_up(repo):

Return True if git attributes have been set up correctly:

  • dgit-defuse-attrs macro exists
  • dgit-defuse-attrs includes attributes we’re interested in
  • dgit-defuse-attrs is enabled for *
  • export-subst and export-ignore are unset for *
def setup_gitattributes(repo, treeish="""HEAD"""):

Setup .git/info/attributes in a way to prevent transformations from interfering with packaging, because the working tree files can differ from the Git revision history (and from the source packages).

Similar functionality has been implemented by dgit and git-deborig, so we try to stay compatible and re-use the name of the attribute macro. Since dgit doesn’t disable export-subst and export-ignore, which may interfere with export-orig, we add this on top the same way git-deborig does.

API Documentation for git-buildpackage, generated by pydoctor at 2021-06-08 15:35:20.