git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 4/4] Add 'filter' attribute and external filter driver definition.

From
DLDavid Lang <david.lang@digitalinsight.com>
Date
Apr 22, 2007, 09:20 UTC
Message-ID
<Pine.LNX.4.63.0704220215540.5946@qynat.qvtvafvgr.pbz>
In-Reply-To
<Pine.LNX.4.63.0704220202550.5946@qynat.qvtvafvgr.pbz>
On Sun, 22 Apr 2007, David Lang wrote:
Show 20 quoted lines
> On Sat, 21 Apr 2007, Junio C Hamano wrote:
>
>> David Lang <david.lang@digitalinsight.com> writes:
>> 
>>> 1. it would be useful in many cases for the filter program to know
>>> what file it's working on (and probably some other things), so there
>>> are probably some command-line arguments that should be able to be
>>> passed to the filter.
>> 
>> I can see that you missed the class when Linus talked about how
>> messy things would get once you allow the conversion to be
>> stateful.  I was in the class and remembered it ;-)
>> 
>> Although I initially considered interpolating "%P" with
>> pathname, I ended up deciding against it, to discourage people
>> from abusing the filter for stateful conversion that changes the
>> results depending on time, pathname, commit, branch and stuff.
>
> I didn't miss it, I just don't think that the path in the repository is 
> nessasarily as dangerous as the other things (time, branch, etc)

to clarify a bit more. I have a perl program that I can point at the 'interesting' files on my systems and have it create a 'generic' version of that file. I can then take that generic version of the file to any machine in the cluster and with the same program create a version of that generic file that's correct for the other system. however to know which substatutions are appropriate to do for the file, it needs to know the filename (well, I guess I could create a whole bunch of seperate config files, and then define all the files with different filters, each filter including the config file to use fo rthat specific file, but this seems like a really ugly way to do it)

> one thing that was listed as a possibilty was to use the sha1 of the file, 
> but you would force the filter to calculate that itself. it's already 
> available when extracting and recalcuating it is a waste
ignore this comment, I see you posted an example of this.
David Lang
Previous: David LangNext: Junio C Hamano
Message 12 of 22 in “External 'filter' attributes and drivers”
  1. 0/4 External 'filter' attributes and driversJunio C Hamano, Apr 21, 2007
  2. 1/4 Simplify calling of CR/LF conversion routinesJunio C Hamano, Apr 21, 2007
  3. 2/4 convert.c: restructure the attribute checking part.Junio C Hamano, Apr 21, 2007
  4. 3/4 lockfile: record the primary process.Junio C Hamano, Apr 21, 2007
  5. 4/4 Add 'filter' attribute and external filter driver definition.Junio C Hamano, Apr 21, 2007
  6. Shawn O. PearceApr 22, 2007
  7. Junio C HamanoApr 22, 2007
  8. Shawn O. PearceApr 22, 2007
  9. David LangApr 22, 2007
  10. Junio C HamanoApr 22, 2007
  11. David LangApr 22, 2007
  12. David LangApr 22, 2007
  13. Junio C HamanoApr 22, 2007
  14. David LangApr 22, 2007
  15. Nicolas PitreApr 22, 2007
  16. David LangApr 22, 2007
  17. Linus TorvaldsApr 22, 2007
  18. Junio C HamanoApr 22, 2007
  19. Alex RiesenApr 21, 2007
  20. David LangApr 22, 2007
  21. Shawn O. PearceApr 22, 2007
  22. David LangApr 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.