All of lore.kernel.org
 help / color / mirror / Atom feed
* Subject: Something like cat-file for the index?
@ 2014-01-10 11:53 Enno Weichert
  2014-01-10 12:58 ` Thomas Gummerer
  0 siblings, 1 reply; 3+ messages in thread
From: Enno Weichert @ 2014-01-10 11:53 UTC (permalink / raw)
  To: git

Hi,

I'd like to have a more technical look into the index file and what/how it
stores data; call it educational spelunking.

I know the index-format.txt but I'd really like to save me the work to
implement a pretty-printed output based on it.
I know ls-files but that's obviously not the whole thing.

So: is there something like cat-file, that basically gives me a readable
version of the information (version number and all...) in the index already
implemented or did nobody care until now?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Subject: Something like cat-file for the index?
  2014-01-10 11:53 Subject: Something like cat-file for the index? Enno Weichert
@ 2014-01-10 12:58 ` Thomas Gummerer
  2014-01-10 14:27   ` Enno Weichert
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gummerer @ 2014-01-10 12:58 UTC (permalink / raw)
  To: Enno Weichert, git


Hi,

Enno Weichert <enno.weichert@gmail.com> writes:
> Hi,
>
> I'd like to have a more technical look into the index file and what/how it
> stores data; call it educational spelunking.
>
> I know the index-format.txt but I'd really like to save me the work to
> implement a pretty-printed output based on it.
> I know ls-files but that's obviously not the whole thing.
>
> So: is there something like cat-file, that basically gives me a readable
> version of the information (version number and all...) in the index already
> implemented or did nobody care until now?

You can use `git ls-files --debug` and `git ls-files --stage` to get all
the information about the files in the index.  The meaning of the flags
is the only thing that's not shown by the command, and I don't think
there is a tool yet to examine them.

The undocumented --resolve-undo flag to git ls-files shows you the
resolve undo data that is stored in the index.

If you build git yourself, the `test-dump-cache-tree` helper can be used
to show all information about the cache-tree that is stored in the
index.

The you can get the version of the index either by using
`test-index-version` when you build git yourself, or by using `file
.git/index`, which in addition will give you the number of entries that
are in the index.

--
Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Subject: Something like cat-file for the index?
  2014-01-10 12:58 ` Thomas Gummerer
@ 2014-01-10 14:27   ` Enno Weichert
  0 siblings, 0 replies; 3+ messages in thread
From: Enno Weichert @ 2014-01-10 14:27 UTC (permalink / raw)
  To: Thomas Gummerer; +Cc: git

Thank you :)

On 1/10/14, Thomas Gummerer <t.gummerer@gmail.com> wrote:
>
> Hi,
>
> Enno Weichert <enno.weichert@gmail.com> writes:
>> Hi,
>>
>> I'd like to have a more technical look into the index file and what/how
>> it
>> stores data; call it educational spelunking.
>>
>> I know the index-format.txt but I'd really like to save me the work to
>> implement a pretty-printed output based on it.
>> I know ls-files but that's obviously not the whole thing.
>>
>> So: is there something like cat-file, that basically gives me a readable
>> version of the information (version number and all...) in the index
>> already
>> implemented or did nobody care until now?
>
> You can use `git ls-files --debug` and `git ls-files --stage` to get all
> the information about the files in the index.  The meaning of the flags
> is the only thing that's not shown by the command, and I don't think
> there is a tool yet to examine them.
>
> The undocumented --resolve-undo flag to git ls-files shows you the
> resolve undo data that is stored in the index.
>
> If you build git yourself, the `test-dump-cache-tree` helper can be used
> to show all information about the cache-tree that is stored in the
> index.
>
> The you can get the version of the index either by using
> `test-index-version` when you build git yourself, or by using `file
> .git/index`, which in addition will give you the number of entries that
> are in the index.
>
> --
> Thomas
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-10 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-10 11:53 Subject: Something like cat-file for the index? Enno Weichert
2014-01-10 12:58 ` Thomas Gummerer
2014-01-10 14:27   ` Enno Weichert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.