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

Re: [PATCH] git-cat-file.txt: Document --textconv

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jun 24, 2010, 12:56 UTC
Message-ID
<4C2355EF.7030604@drmicha.warpmail.net>
In-Reply-To
<vpqmxukir3e.fsf@bauges.imag.fr>
Matthieu Moy venit, vidit, dixit 24.06.2010 13:53:
Show 21 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
>> This formulation is based on my understanding that you can't cat-file
>>  --textconv something in the index or worktree.
> 
> Actually, you can't textconv from the worktree, but you can from the
> index, saying
> 
> git cat-file --textconv :path/to/file
> 
> (the :<path> syntax is not specific here, you can use it in other Git
> commands)
> 
>> +--textconv::
>> +	Show the content as transformed by a textconv filter. In this case,
>> +	<object> has be of the form <treeish:path>, with treeish defaulting to
>> +	HEAD.
> 
> So the "defaulting to HEAD" is incorrect. 

Oh no, this is bad! I'd say every git command defaults to HEAD when a commitish/treeish is not specified!!

Wait a minute:

git show HEAD:path >a git show :path >b diff a b

Oh no! We've been having this all along. This is bad but probably unchangeable.

> Also, I prefer
> <treeish>:<path> to <treeish:path>, to make it clear the : is actually
> a :.

I was going with the usage line, but you are right: <a>:<b> makes more sense semantically and is clearer.

Show 8 quoted lines
> 
> What about this:
> 
> --textconv:: 
> 	Show the content as transformed by a textconv filter. In this
> 	case, <object> has be of the form <treeish>:<path>, or :<path>
> 	to run the filter on the file <path> stored in the index.
> 
I'll be more mathematically stubborn about "file", see v2;)
Michael
Previous: Matthieu MoyNext: Michael J Gruber
Message 3 of 22 in “git-cat-file.txt: Document --textconv”
  1. git-cat-file.txt: Document --textconvMichael J Gruber, Jun 24, 2010
  2. Matthieu MoyJun 24, 2010
  3. Michael J GruberJun 24, 2010
  4. [PATCHv2] git-cat-file.txt: Document --textconvMichael J Gruber, Jun 24, 2010
  5. Matthieu MoyJun 24, 2010
  6. Junio C HamanoJun 24, 2010
  7. git-rev-parse.txt: Document ":path" specifierMichael J Gruber, Jun 24, 2010
  8. Junio C HamanoJun 24, 2010
  9. [PATCHv2] git-rev-parse.txt: Document ":path" specifierMichael J Gruber, Jun 25, 2010
  10. Matthieu MoyJun 25, 2010
  11. Junio C HamanoJun 25, 2010
  12. [PATCHv3] git-rev-parse.txt: Document ":path" specifierMichael J Gruber, Jun 27, 2010
  13. Junio C HamanoJun 27, 2010
  14. Michael J GruberJun 27, 2010
  15. Matthieu MoyJun 28, 2010
  16. git-rev-parse.txt: Add more examples for caret and colonMichael J Gruber, Jun 28, 2010
  17. Peter KjellerstedtJun 28, 2010
  18. Michael J GruberJun 28, 2010
  19. [PATCHv2] git-rev-parse.txt: Add more examples for caret and colonMichael J Gruber, Jun 28, 2010
  20. Junio C HamanoJun 25, 2010
  21. Junio C HamanoJun 24, 2010
  22. Michael J GruberJun 25, 2010

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.