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

Re: [RFC] git cat-file "literally" option

From
karthik nayak <karthik.188@gmail.com>
Date
Feb 18, 2015, 12:50 UTC
Message-ID
<54E48A96.8010301@gmail.com>
In-Reply-To
<54E45DD7.205@gmail.com>
On 02/18/2015 03:09 PM, karthik nayak wrote:
Show 31 quoted lines
> Hey,
> After reading 
> http://thread.gmane.org/gmane.comp.version-control.git/256878
> I have started working on the git cat file --literally option.
>
> I'm wondering if I should implement it as an add on to the existing 
> options,
> wherein we could say "git cat-file (t | -s | -e | -p | <type> | 
> --texconv) --literally <object>"
> so that it would be able to print the required data literally or 
> should I implement it such that
> we could say "git cat-file (-t | -s | -e | -p | <type> | --texconv | 
> --literally) <object>"
> so it would just give all information about the given object. (Maybe 
> like the -p option?)
>
> For example :
> if  I create a bogus object like
>
> git hash-object -t bogus --literally -w --stdin </dev/null
>
> Should I implement
> git cat-file -t --literally 49993fe130c4b3bf24857a15d7969c396b7bc187
> or should I implement
> git cat-file --literally 49993fe130c4b3bf24857a15d7969c396b7bc187
> To get information pertaining to the object "bogus:.
>
>
> What do you people think?
> Thanks
> -Karthik

Also, Is there any way I can get the type of object made via git hash-object --literally. The problem I'm facing is "sha1_object_info()" returns a object_type enum, so objects not specified there are considered as errors.

Previous: karthik nayakNext: Duy Nguyen
Message 2 of 5 in “[RFC] git cat-file "literally" option”
  1. karthik nayakFeb 18, 2015
  2. karthik nayakFeb 18, 2015
  3. Duy NguyenFeb 18, 2015
  4. Junio C HamanoFeb 18, 2015
  5. karthik nayakFeb 19, 2015

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.