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

Re: [PATCH 2/4] add smudge-to-file and clean-from-file filter configuration

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 17, 2016, 18:24 UTC
Message-ID
<xmqqa8ij1xne.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160617180650.GA16404@kitenet.net>
Joey Hess <id@joeyh.name> writes:
Show 5 quoted lines
> Or we could pick one of the two methods of appending the file
> (I prefer not including a space before it as more flexible), and
> anything using this interface would need to design its command line
> parsing with this interface in mind, and would probably choose to use
> --to-file=foo rather than --to-file foo.

When I gave the example in the message you are responding to, I chose to assume that we will always have a space there, and this was to to avoid a problem that will become common if we did otherwise, namely:

    [filter "foo"] cleanFromFile = command
which must be spelled as
    [filter "foo"] cleanFromFile = "command "

to separate the command name with it argument if we didn't add the space there.

I tend to agree with what you said in the other response, i.e. "Probably anything using this interface is gonna be implemented with the interface in mind from the beginning", so they will not have an issue if the interface always added a space there, and there is the "sh -c" thing if they really want to do something unusual.

Previous: Joey HessNext: Joey Hess
Message 14 of 22 in “extend smudge/clean filters with direct file access”
  1. 0/4 extend smudge/clean filters with direct file accessJoey Hess, Jun 16, 2016
  2. 3/4 use clean-from-file in git addJoey Hess, Jun 16, 2016
  3. 2/4 add smudge-to-file and clean-from-file filter configurationJoey Hess, Jun 16, 2016
  4. Junio C HamanoJun 16, 2016
  5. Joey HessJun 17, 2016
  6. Junio C HamanoJun 17, 2016
  7. Eric SunshineJun 17, 2016
  8. Michael J GruberJun 17, 2016
  9. Joey HessJun 17, 2016
  10. Junio C HamanoJun 17, 2016
  11. Junio C HamanoJun 17, 2016
  12. Joey HessJun 17, 2016
  13. Joey HessJun 17, 2016
  14. Junio C HamanoJun 17, 2016
  15. 1/4 clarify %f documentationJoey Hess, Jun 16, 2016
  16. Junio C HamanoJun 16, 2016
  17. Joey HessJun 17, 2016
  18. Junio C HamanoJun 17, 2016
  19. Joey HessJun 17, 2016
  20. Junio C HamanoJun 17, 2016
  21. 4/4 use smudge-to-file in git checkout etcJoey Hess, Jun 16, 2016
  22. Joey HessJun 16, 2016

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.