gbp-setup-gitattributes - Set up Git attributes for packaging
Contents
Description
gbpsetup-gitattributes sets up .git/info/attributes in the current Git repository to sane defaults most
suitable for packaging work. At the moment, this amounts to making sure no transformations happen during
checkout, commit or export. More attributes may be added in future, by default all known settings are ap‐
plied.
Upstream sources may ship .gitattributes files enabling certain transformations to the committed source,
usually to make working with files in different encodings more convenient for the upstream authors. For
Debian packaging, it is necessary to override these attributes, since they cause often unwanted conver‐
sion of files (e.g. line endings, encodings and some others). Working with such source tree is confus‐
ing, since the working tree differs from the Git history (and sometimes from the source tarball), and can
lead to errors.
By default, gbpclone tries to detect the usage of .gitattributes in the upstream source and disables the
Git attributes only when necessary.
Name
gbp-setup-gitattributes - Set up Git attributes for packaging
Options
--version
Print version of the program, i.e. version of the git-buildpackage suite
-v, --verbose
Verbose execution
-h, --help
Print help and exit
--color=[auto|on|off]
Whether to use colored output.
--color-scheme=COLOR_SCHEME
Colors to use in output (when color is enabled). The format for COLOR_SCHEME is '<debug>:<in‐
fo>:<warning>:<error>'. Numerical values and color names are accepted, empty fields imply the de‐
fault color. For example, --git-color-scheme='cyan:34::' would show debug messages in cyan, info
messages in blue and other messages in default (i.e. warning and error messages in red).
--[no-]dgit-defuse-attrsDisablesalltransformingattributesforallfiles.Thisisdonebydefiningamacroattribute[attr]dgit-defuse-attrsandapplyingitto*togetherwithexport-substandexport-ignore.
This method is compatible with dgit and git-deborig which use this macro attribute. Older versions
of dgit use an incomplete preset missing some attributes; if such is found, it is replaced by an
updated definition.
--all Apply all known Git attribute settings. This is the default.
See Also
gbp-clone(1), gbp-push(1), gbp.conf(5), gitattributes(5), dgit(7)
Synopsis
gbpsetup-gitattributes [--version] [--help] [--verbose] [--color=[auto|on|off]] [--color-scheme=COLOR_SCHEME] [--[no-]dgit-defuse-attrs] [--all]
