Reference

gbp-setup-gitattributes(1)

Set up Git attributes for packaging

NAME

gbp-setup-gitattributes - Set up Git attributes for packaging

SYNOPSIS

FCgbp setup-gitattributesF[0] [FC--versionF[0]] [FC--helpF[0]] [FC--verboseF[0]] [FC--color=F[0][auto|on|off]] [FC--color-scheme=F[0] COLOR_SCHEME] [FC--[no-]dgit-defuse-attrsF[0]] [FC--allF[0]]

DESCRIPTION

gbp setup-gitattributes sets up FC.git/info/attributesF[0] 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 applied.

Upstream sources may ship FC.gitattributesF[0] 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 conversion of files (e.g. line endings, encodings and some others). Working with such source tree is confusing, since the working tree differs from the Git history (and sometimes from the source tarball), and can lead to errors.

By default, gbp clone tries to detect the usage of FC.gitattributesF[0] in the upstream source and disables the Git attributes only when necessary.

OPTIONS

FC--versionF[0]

Print version of the program, i.e. version of the git-buildpackage suite

FC-vF[0], FC--verboseF[0]

Verbose execution

FC-hF[0], FC--helpF[0]

Print help and exit

FC--color=F[0][auto|on|off]

Whether to use colored output.

FC--color-scheme=F[0]COLOR_SCHEME

Colors to use in output (when color is enabled). The format for COLOR_SCHEME is '<debug>:<info>:<warning>:<error>'. Numerical values and color names are accepted, empty fields imply the default color. For example, FC--git-color-scheme=F[0]FC'cyan:34::'F[0] would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red).

FC--[no-]dgit-defuse-attrsF[0]

FCDisables all transforming attributes for all files. This is done by defining a macro attribute F[0]FC[attr]dgit-defuse-attrsF[0]FC and applying it to F[0]FC*F[0]FC together with F[0]FCexport-substF[0]FC and F[0]FCexport-ignoreF[0]FC.F[0]

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.

FC--allF[0]

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)

AUTHOR

Andrej Shadura <[email protected][0]>

History