File: gbp-setup-gitattributes.xml

package info (click to toggle)
git-buildpackage 0.9.30
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,700 kB
  • sloc: python: 18,390; xml: 8,558; sh: 698; makefile: 123
file content (103 lines) | stat: -rw-r--r-- 3,816 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<refentry id="man.gbp.setup.gitattributes">
  <refentryinfo>
    <address>
      <email>andrew@shadura.me</email>
    </address>
    <author>
      <firstname>Andrej</firstname>
      <surname>Shadura</surname>
    </author>
  </refentryinfo>
  <refmeta><refentrytitle>gbp-setup-gitattributes</refentrytitle>
    &dhsection;
  </refmeta>
  <refnamediv>
    <refname>gbp-setup-gitattributes</refname>
    <refpurpose>Set up &git; attributes for packaging</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      &gbp-setup-gitattributes;

      &man.common.options.synopsis;
      <arg><option>--[no-]dgit-defuse-attrs</option></arg>
      <arg><option>--all</option></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      &gbp-setup-gitattributes; sets up <filename>.git/info/attributes</filename> 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.
    </para>
    <para>
      Upstream sources may ship <filename>.gitattributes</filename> 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.
    </para>
    <para>
      By default, &gbp-clone; tries to detect the usage of <filename>.gitattributes</filename> in the
      upstream source and disables the Git attributes only when necessary.
    </para>
  </refsect1>
  <refsect1>
    <title>OPTIONS</title>
    <variablelist>
      &man.common.options.description;
      <varlistentry>
        <term><option>--[no-]dgit-defuse-attrs</option>
        </term>
        <listitem>
          <para>
            <option>Disables all transforming attributes for all files. This is done by
            defining a macro attribute <symbol>[attr]dgit-defuse-attrs</symbol> and applying it
            to <filename>*</filename> together with <symbol>export-subst</symbol> and
            <symbol>export-ignore</symbol>.</option>
          </para>
          <para>
            This method is compatible with <command>dgit</command> and <command>git-deborig</command>
            which use this macro attribute. Older versions of <command>dgit</command> use an incomplete
            preset missing some attributes; if such is found, it is replaced by an updated definition.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--all</option>
        </term>
        <listitem>
          <para>
            Apply all known &git; attribute settings. This is the default.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <xref linkend="man.gbp.clone"/>,
      <xref linkend="man.gbp.push"/>,
      <xref linkend="man.gbp.conf"/>,
      <citerefentry>
        <refentrytitle>gitattributes</refentrytitle>
        <manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>dgit</refentrytitle>
        <manvolnum>7</manvolnum>
      </citerefentry>
    </para>
  </refsect1>
  <refsect1>
    <title>AUTHOR</title>
    <para>
      Andrej Shadura <email>andrew@shadura.me</email>
    </para>
  </refsect1>
</refentry>