Simon Josefsson writes ("Idea how to improve .gitattributes handling"):
> Couldn't you extend --quilt=gbp (or add another quilt mode) that behave
> the same for .gitignore but for all files in .gitattributes marked with
> export-subst?

I'm afraid we've had this conversation before.  This possibility is
mentionioned in

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079434#20

where I wrote:

  In theory it might be possible to regard this is a
  "maintainer-to-dgit-view" transformation.  We do have such
  transformations.  But there are two significant objections to that:

  Firstly, tree transformations are currently *only* for "3.0 (quilt)"
  source packages.  I think this is quite a helpful rule.  "3.0 (quilt)"
  is very odd, but the underlying task (maintaining a delta, long term)
  is an open problem - there are multiple ways to do it, but none of
  them are perfect.

  Secondly, the transformations are capricious: they do different things
  in different context.  So what you get when you run it locally
  wouldn't necessarily be the same thing as the tag2upload conversion
  service sees.  In your versioning example, the tag2upload service
  might not have the tag that was expected to be used to substitute the
  version information.  This means that the meaning of a tag2upload tag
  (the instruction to upload) is no longer clear simply by examining the
  tag and the git objevts it references.

In case it's not obvious, people might want .gitattributes mutations
applied for other source formats too, even 3.0 (native).  I don't
think source-format-specific gitattributes handling is a good idea.

> You'd need a .gitattributes parser, but it is fairly simple.  Any file
> marked with 'export-subst' would then be subject to the same "ignore"
> handling as the .gitignore file.

With .gitignore it is possible to reliably determine what the file
contents is supposed to be.  Even if we restrict ourselves to
export-subst, that's not possible with gitattributes, because we might
have the wrong set of tags available (at the point where the
export-subst is being processed).

Regards,
Ian.

-- 
Ian Jackson <[email protected]>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.

Reply via email to