From: Andrej Shadura Date: Sat, 13 Feb 2021 19:11:19 +0000 (+0100) Subject: docs: Add a manpage for gbp setup-gitattributes X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85b0b6599893dad34b57fba33f343b852dfadc59;p=tools%2Fgit-buildpackage.git docs: Add a manpage for gbp setup-gitattributes Describle how and why the attributes are being disabled, refer to dgit, git-deborig and Git documentation; add a reference to the gbp-clone manpage. Signed-off-by: Andrej Shadura --- diff --git a/docs/Makefile b/docs/Makefile index d1567e5e..41f172b0 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -16,6 +16,7 @@ MAN1S = \ gbp-pristine-tar \ gbp-pull \ gbp-push \ + gbp-setup-gitattributes \ gbp-tag \ gbp-buildpackage-rpm \ gbp-import-srpm \ diff --git a/docs/common.ent b/docs/common.ent index 38ae8636..794d47ce 100644 --- a/docs/common.ent +++ b/docs/common.ent @@ -35,6 +35,7 @@ gbp pristine-tar"> gbp pull"> gbp push"> + gbp setup-gitattributes"> gbp rpm-ch"> gbp tag"> gbp.conf"> diff --git a/docs/man.gbp.xml b/docs/man.gbp.xml index 8d044a81..d74e906e 100644 --- a/docs/man.gbp.xml +++ b/docs/man.gbp.xml @@ -30,5 +30,6 @@ &man.gbp.pull; &man.gbp.push; &man.gbp.rpm.ch; +&man.gbp.setup.gitattributes; &man.gbp.tag; diff --git a/docs/manpages/gbp-clone.xml b/docs/manpages/gbp-clone.xml index 5041f543..849d990a 100644 --- a/docs/manpages/gbp-clone.xml +++ b/docs/manpages/gbp-clone.xml @@ -217,6 +217,7 @@ , , + , , gitattributes diff --git a/docs/manpages/gbp-setup-gitattributes.xml b/docs/manpages/gbp-setup-gitattributes.xml new file mode 100644 index 00000000..8c44c2ca --- /dev/null +++ b/docs/manpages/gbp-setup-gitattributes.xml @@ -0,0 +1,77 @@ + + +
+ andrew@shadura.me +
+ + Andrej + Shadura + +
+ gbp-setup-gitattributes + &dhsection; + + + gbp-setup-gitattributes + Set up &git; attributes to disable transformations + + + + &gbp-setup-gitattributes; + + &man.common.options.synopsis; + + + + DESCRIPTION + + &gbp-setup-gitattributes; sets up .git/info/attributes in the current + repository to disable all transforming attributes for all files. This is done by defining + a macro attribute [attr]dgit-defuse-attrs and applying it to * + together with export-subst and export-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. + + + Disabling those attributes is necessary, since they cause often unwanted conversion of files + on checkout (e.g. line endings, encodings, etc). 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 .gitattributes in the + upstream source and disable the Git attributes only when necessary. + + + + OPTIONS + + &man.common.options.description; + + + + SEE ALSO + + , + , + , + + gitattributes + 5 + , + + dgit + 7 + + + + + AUTHOR + + Andrej Shadura andrew@shadura.me + + +
diff --git a/docs/manpages/manpages.ent b/docs/manpages/manpages.ent index b53ff4e4..f07f6c2f 100644 --- a/docs/manpages/manpages.ent +++ b/docs/manpages/manpages.ent @@ -19,6 +19,7 @@ +