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

Re: [PATCH] More docs

From
Junio C Hamano <junkio@cox.net>
Date
Apr 22, 2005, 20:45 UTC
Message-ID
<7vwtqu5ymu.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<4269557C.1050606@dgreaves.com>
>>>>> "DG" == David Greaves <david@dgreaves.com> writes:
DG> Removed Cogito stuff
DG>  commit-id
This is Cogito invention, not in the core.  Neither is tree-id.

DG> ################################################################ DG> +diff-cache DG> ... DG> +-z DG> + /0 line termination on output

Write this either '\0' (for C literate) or NUL (ASCII character name), please. The same for other commands with -z.

DG> diff-tree DG> - diff-tree [-r] [-z] <tree sha1> <tree sha1> DG> + diff-tree [-r] [-z] <tree/commit sha1> <tree/commit sha1> DG> +... DG> +--cached DG> + Cached only (private?)

What? The beauty of diff-tree is it does not care about dircache at all. Maybe this is a Pasky addition, but I wonder what the semantics of this option and why it is here...

DG> ################################################################ DG> read-tree DG> - read-tree [-m] <sha1> DG> + read-tree (<sha> | -m <sha1> [<sha2> <sha3>])" DG> + DG> +Reads the tree information given by <sha> into the directory cache, DG> +but does not actually _update_ any of the files it "caches". (see: DG> +checkout-cache) DG> + DG> +Optionally, it can merge a tree into the cache or perform a 3-way DG> +merge. DG> + DG> +Trivial merges are done by read-tree itself. Only conflicting paths DG> +will be in unmerged state when read-tree returns. DG> +... DG> +NOTE NOTE NOTE! although read-tree coule do some of these nontrivial DG> +merges, only the "matches in all three states" thing collapses by DG> +default.

The above "NOTE" is taken from the initial message from Linus but it is no longer true. These days, it merges when:

    - stage 2 and 3 are the same
    - stage 1 and stage 2 are the same and stage 3 is different
    - stage 1 and stage 3 are the same and stage 2 is different
Originally it merged only when all stages are the same.

Also you do not describe the single tree merge ("read-tree -m sha1"). Its semantics is:

    Operate as if the user did not specify "-m", but if the
    original cache had an entry for the same pathname already
    and the contents of the original matches with the tree being
    read, use the stat info from the original instead.

This is used to avoid unnecessary false hits when show-diff is run after read-tree.

DG>  ################################################################
DG> @@ -151,8 +603,145 @@
DG>  show-files
DG>  	show-files [-z] [-t] (--[cached|deleted|others|ignored|stage])*
 
Although I like it, I do not think -t is in core.  It is Pasky.
Also you missed "show-files --unmerged".
    
Previous: David GreavesNext: David Greaves
Message 2 of 7 in “More docs”
  1. More docsDavid Greaves, Apr 22, 2005
  2. Junio C HamanoApr 22, 2005
  3. David GreavesApr 22, 2005
  4. Junio C HamanoApr 22, 2005
  5. fsck doc: remove ancient out-of-date diagnosticsÆvar Arnfjörð Bjarmason, Jan 16, 2021
  6. Taylor BlauJan 19, 2021
  7. Junio C HamanoJan 21, 2021

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.