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

Re: Transparently encrypt repository contents with GPG

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 14, 2009, 18:45 UTC
Message-ID
<7viqmcaqov.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<49BB920A.20301@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Since both the cleaned and the smudged version are supposed to be
> "authoritative" (as opposed to the textconv'ed one) one may argue either
> way what's the right approach.

Smudged one can never be authoritative. That is the whole point of smudge filter and in general the whole convert_to_working_tree() infrastructure. It changes depending on who you are (e.g. on what platform you are on). So running comparison between two clean versions is the only sane thing to do.

You could argue textconv should work on smudged contents or on clean contents before smudging. As long as it is done consistently, I do not care either way too deeply, as its output is not supposed to be used for anything but human consumption. Two equally sane arrangement would be:

 (1) Start from two clean contents (run convert_to_git() if contents were
     obtained from the work tree), run textconv, run diff, and output the
     result literally; or
 (2) Start from two smudged contents (run convert_to_working_tree() for
     contents taken from the repository), run textconv, run diff, and
     run clean before sending the result to the output.

The former assumes a textconv filter that wants to work on clean contents, the latter for a one that expects smudged input. I probably would suggest going the former approach, as it is consistent with the general principle in other parts of the system (the internal processing happens on clean contents).

Both of the above two assumes that the output should come in clean form; it is consistent with the way normal diff is generated for consumption by git-apply. You can certainly argue that the final output should be in smudged form when textconv is used, as it is purely for human consumption, and is not even supposed to be fed to apply.

Previous: Michael J GruberNext: Michael J Gruber
Message 12 of 18 in “Transparently encrypt repository contents with GPG”
  1. Matthias NothhaftMar 12, 2009
  2. Sverre RabbelierMar 12, 2009
  3. Michael J GruberMar 13, 2009
  4. Sverre RabbelierMar 13, 2009
  5. Thomas RastMar 13, 2009
  6. Sverre RabbelierMar 13, 2009
  7. Michael J GruberMar 13, 2009
  8. Sverre RabbelierMar 13, 2009
  9. Jeff KingMar 13, 2009
  10. Junio C HamanoMar 13, 2009
  11. Michael J GruberMar 14, 2009
  12. Junio C HamanoMar 14, 2009
  13. Michael J GruberMar 16, 2009
  14. Jeff KingMar 17, 2009
  15. Jeff KingMar 17, 2009
  16. bigbearApr 21, 2012
  17. lalebardeJun 17, 2012
  18. lalebardeJun 18, 2012

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.