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

Re: Documentation problems

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Sep 20, 2009, 18:24 UTC
Message-ID
<vpqvdjdzd6x.fsf@bauges.imag.fr>
In-Reply-To
<4AB66D4C.70301@gmail.com>
Bruce Korb <bruce.korb@gmail.com> writes:
Show 11 quoted lines
> Hi,
>
> I'm trying to figure out what a ``tree-ish''.
> I cannot seem to use many of the commands until I know.
>
> <tree-ish>
>     Indicates a tree, commit or tag object name. A command that takes a
>     <tree-ish> argument ultimately wants to operate on a <tree> object
>     but automatically dereferences <commit> and <tag> objects that point at a <tree>.
>
> I need a translation.  :(  Thank you.  Regards, Bruce
tree = directory (with its content).

For example, the last commit in the current branch is a Git object of type "commit", which contains mostly a log message, a few headers, and a pointer to the tree object corresponding to the content of the directory in which you made the commit (modulo what you excluded from the commit of course). Therefore, the name of this commit, although not really a tree, is a tree-ish in that it talks about one and only one tree. You could name it HEAD, a sha1sum (like 5a2abc12d64a5e00daa6aebbb673715f365a564a), the name of the branch (like "master"), ...

Show 7 quoted lines
> P.S. I have a SuSE installation with everything relating to GIT installed.
> The man pages reference commands like, "git-ls-tree --name-only" except
> that there isn't any such command.  Unless you reverse engineer the
> implementation of "git", discover the /usr/lib/git directory and add it
> to your path.  That hassle is rather inconvenient.  More hints about
> where the git commands get squirreled away would be useful.  Thank
> you.

Just type "git ls-tree --name-only". git-ls-tree is the old way to refer to the command name. Normally, any reference to dashed names should have been removed from the documentation by now (so most likely you see it in your distro because it's an old enough version, otherwise, it's a bug in the doc).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Bruce KorbNext: Bruce Korb
Message 2 of 5 in “Documentation problems”
  1. Bruce KorbSep 20, 2009
  2. Matthieu MoySep 20, 2009
  3. Bruce KorbSep 20, 2009
  4. Matthieu MoySep 20, 2009
  5. Andreas SchwabSep 20, 2009

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.