chiark / gitweb /
gitattributes: Docs and message wordsmithing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 15 Jan 2017 22:45:31 +0000 (22:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 16 Jan 2017 01:25:19 +0000 (01:25 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit
dgit.1
dgit.7

diff --git a/dgit b/dgit
index 3d81558fc21bc1044ddc50684a1ff8ea058724e8..e4cc92c08fa8db70bda8e8e3dcdf959c39cf6952 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3392,7 +3392,7 @@ sub check_gitattrs ($$) {
        # oh dear, found one
        print STDERR <<END;
 dgit: warning: $what contains .gitattributes
-dgit: .gitattributes have not been defused.  See GITATTRIBUTES in dgit(7).
+dgit: .gitattributes have not been defused.  Recommended: dgit setup-new-tree.
 END
        close $gafl;
        return;
diff --git a/dgit.1 b/dgit.1
index 8cf3928ae9efeb0d519dd74a0425691df65ce0af..88691496699a98de7fb0156e41adb4916aed4619 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -216,9 +216,10 @@ public key in its keyring (but not your private key, obviously).
 .B dgit setup-new-tree
 Configure the current working tree the way that dgit clone would have
 set it up.  Like running
-.B dgit setup-useremail
-and
+.BR "dgit setup-useremail" ,
 .B setup-mergechangelogs
+and
+.B setup-gitattributes
 (but only does each thing if dgit is configured to do it automatically).
 You can use these in any git repository, not just ones used with
 the other dgit operations.
@@ -235,6 +236,29 @@ Configures a git merge helper for the file
 which uses
 .BR dpkg-mergechangelogs .
 .TP
+.B dgit setup-gitattributes
+Set up the working tree's
+.B .git/info/attributes
+to disable all transforming attributes for all files.
+This is done by defining a macro attribute
+.B dgit-defuse-attrs
+and applying it to
+.BR * .
+For why, see
+.B GITATTRIBUTES
+in
+.BR dgit(7) .
+
+(If there is already a macro attribute line
+.B [attr]dgit-defuse-attrs
+in .git/info/attributes
+(whatever its effects),
+this operation does nothing further.
+This fact can be used to defeat or partially defeat
+dgit setup-gitattributes
+and hence
+dgit setup-new-tree.)
+.TP
 .B dgit quilt-fixup
 `3.0 (quilt)' format source packages need changes representing not
 only in-tree but also as patches in debian/patches.  dgit quilt-fixup
diff --git a/dgit.7 b/dgit.7
index 09bb8f4424f9d235e8ca115b61c593980bfd93ae..70165a1b69d0d9f745ae6e2f2a92135f985a8870 100644 (file)
--- a/dgit.7
+++ b/dgit.7
@@ -205,6 +205,9 @@ is configured this way.
 git has features which can automatically transform files
 as they are being copied between the working tree
 and the git history.
+The attributes can be specified in the source tree itself,
+in
+.BR .gitattributes .
 See \fBgitattributes\fP(5).
 
 These transformations are context-sensitive
@@ -213,25 +216,23 @@ so dgit operates on the principle that
 the dgit git history contains the actual contents of the package.
 (When dgit is manipulating a .dsc,
 it does so in a private area,
-where the transforming gitattributes are defused (disabled),
+where the transforming gitattributes are defused,
 to achieve this.)
 
-If transforming gitattributes used,
+If transforming gitattributes are used,
 they can cause trouble,
 because the working tree files can differ from
 the git revision history
 (and therefore from the source packages).
+dgit warns if it finds a .gitattributes file
+(in a package being fetched or imported),
+unless the transforming gitattributes have been defused.
 
-So dgit clone
+dgit clone
 and dgit setup-new-tree
 disable transforming gitattributes
 by default,
-by creating a .git/info/attributes.
-When fetching or importing sources
-dgit warns if it finds .gitattributes file
-and the transforming gitattributes have not been defused
-(e.g. in the case of a tree not made with dgit clone).
-
+by creating a suitable .git/info/attributes.
 See
 .B dgit setup-new-tree
 and