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

Re: Some ASCII Art

From
Junio C Hamano <junkio@cox.net>
Date
Oct 6, 2005, 20:38 UTC
Message-ID
<7v8xx67559.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<1128621923.29904.30.camel@cashmere.sps.mot.com>
Jon Loeliger <jdl@freescale.com> writes:
> Fundamental Git Index Operations
> Git Index Operations
These two look almost the same.

I find the label "commit-tree" on index -> odb in the second picture a bit misleading. "commit-tree" takes a tree and zero or more commit objects to create a new commit object, so it works solely inside odb.

It is good that you mention that "read-tree -u" form updates working tree in the second picture. In the same spirit, you might also want to mention that "checkout-index -u" updates the index (i.e. matches the stat information) in the same picture.

Diff drawing looks good. If you are aiming for completeness, diff-stages is lacking -- it compares between stages in the index file. But diff-stages is really a specialized operation whose usefulness is still unproven, so not drawing it for the sake of simplicity is also OK.

> Commit DAG Revision Naming
> ==========================
>
> Both node B and C are a commit parents of node A.

I assume that parents are left to right in this picture, that is, B's first parent is D, second E, and third F.

Show 17 quoted lines
>
>     G   H   I   J
>      \ /     \ /
>       D   E   F
>        \  |  /
>         \ | /
>          \|/
>           B     C
>            \   /
>             \ /
>              A
>
>
>     A = rev    = rev^0
>     B = rev^   = rev^1     = rev~1
>     D = rev^^  = rev^1^1   = rev~2
>     G = rev^^^ = rev^1^1^1 = rev~3
> Is there a way to name node C, E, F, H, I or J?

C = A^2 E = B^2 = A^^2 F = B^3 = A^^3 H = D^2 = B^^2 = A^^^2 = A~2^2 I = F^ = B^3^ = A^^3^ J = F^2 = B^3^2 = A^^3^2

They look like line noise ;-)
> Is A also called rev~0?

If you are talking about only commit objects, then REV^0 is always the same as REV. You could write REV^0^0^0^0 if you want but that is rather pointless ;-).

Previous: Jon LoeligerNext: Jon Loeliger
Message 2 of 4 in “Some ASCII Art”
  1. Jon LoeligerOct 6, 2005
  2. Junio C HamanoOct 6, 2005
  3. Jon LoeligerOct 7, 2005
  4. Junio C HamanoOct 7, 2005

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.