'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH gbp-setup-gitattributes 1 "15 December 2023" "" "git-buildpackage Manual" .SH NAME gbp-setup-gitattributes \- Set up Git attributes for packaging .SH SYNOPSIS 'nh .fi .ad l \*(T<\fBgbp\ setup\-gitattributes\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [\*(T<\fB\-\-version\fR\*(T>] [\*(T<\fB\-\-help\fR\*(T>] [\*(T<\fB\-\-verbose\fR\*(T>] [\*(T<\fB\-\-color=\fR\*(T>[auto|on|off]] [\*(T<\fB\-\-color\-scheme=\fR\*(T> \fICOLOR_SCHEME\fR] [\*(T<\fB\-\-[no\-]dgit\-defuse\-attrs\fR\*(T>] [\*(T<\fB\-\-all\fR\*(T>] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBgbp\ setup-gitattributes\fR sets up \*(T<\fI.git/info/attributes\fR\*(T> 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. .PP Upstream sources may ship \*(T<\fI.gitattributes\fR\*(T> 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. .PP By default, \fBgbp\ clone\fR tries to detect the usage of \*(T<\fI.gitattributes\fR\*(T> in the upstream source and disables the Git attributes only when necessary. .SH OPTIONS .TP \*(T<\fB\-\-version\fR\*(T> Print version of the program, i.e. version of the git-buildpackage suite .TP \*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-verbose\fR\*(T> Verbose execution .TP \*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> Print help and exit .TP \*(T<\fB\-\-color=\fR\*(T>[auto|on|off] Whether to use colored output. .TP \*(T<\fB\-\-color\-scheme=\fR\*(T>\fICOLOR_SCHEME\fR Colors to use in output (when color is enabled). The format for COLOR_SCHEME is \&':::'. Numerical values and color names are accepted, empty fields imply the default color. For example, \*(T<\fB\-\-git\-color\-scheme=\fR\*(T>\*(T<'cyan:34::'\*(T> would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red). .TP \*(T<\fB\-\-[no\-]dgit\-defuse\-attrs\fR\*(T> \*(T<\fBDisables all transforming attributes for all files. This is done by defining a macro attribute \fR\*(T>\*(T<\fB[attr]dgit\-defuse\-attrs\fR\*(T>\*(T<\fB and applying it to \fR\*(T>\*(T<\fB\fI*\fR\fR\*(T>\*(T<\fB together with \fR\*(T>\*(T<\fBexport\-subst\fR\*(T>\*(T<\fB and \fR\*(T>\*(T<\fBexport\-ignore\fR\*(T>\*(T<\fB.\fR\*(T> This method is compatible with \fBdgit\fR and \fBgit-deborig\fR which use this macro attribute. Older versions of \fBdgit\fR use an incomplete preset missing some attributes; if such is found, it is replaced by an updated definition. .TP \*(T<\fB\-\-all\fR\*(T> Apply all known Git attribute settings. This is the default. .SH "SEE ALSO" \fBgbp-clone\fR(1), \fBgbp-push\fR(1), \fBgbp.conf\fR(5), \fBgitattributes\fR(5), \fBdgit\fR(7) .SH AUTHOR Andrej Shadura <\*(T>