git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Documentation problems
@ 2009-09-20 17:58 Bruce Korb
  2009-09-20 18:24 ` Matthieu Moy
  2009-09-20 20:52 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Bruce Korb @ 2009-09-20 17:58 UTC (permalink / raw)
  To: git

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

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.

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

* Re: Documentation problems
  2009-09-20 17:58 Documentation problems Bruce Korb
@ 2009-09-20 18:24 ` Matthieu Moy
  2009-09-20 18:37   ` Bruce Korb
  2009-09-20 20:52 ` Andreas Schwab
  1 sibling, 1 reply; 5+ messages in thread
From: Matthieu Moy @ 2009-09-20 18:24 UTC (permalink / raw)
  To: Bruce Korb; +Cc: git

Bruce Korb <bruce.korb@gmail.com> writes:

> 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"), ...

> 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/

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

* Re: Documentation problems
  2009-09-20 18:24 ` Matthieu Moy
@ 2009-09-20 18:37   ` Bruce Korb
  2009-09-20 18:45     ` Matthieu Moy
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Korb @ 2009-09-20 18:37 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

Hi Matthieu,
>> I'm trying to figure out what a ``tree-ish''.

>> 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"), ...

Since I haven't created any any branches (to my knowledge), it seems
that "master" is the magic branch name.  My goal was just to get a
list of managed files.  Is "master" going to remain my "HEAD" now?
(Assuming I don't do something to make a new branch.  One branch
is enough for my little one person project....)

> Just type "git ls-tree --name-only".
Ah.  Thank you.
> 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).

$ git --version
git version 1.6.0.2

I guess the man pages and installation were out of sync for that release.

Thank you for the quick reply!  Regards, Bruce

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

* Re: Documentation problems
  2009-09-20 18:37   ` Bruce Korb
@ 2009-09-20 18:45     ` Matthieu Moy
  0 siblings, 0 replies; 5+ messages in thread
From: Matthieu Moy @ 2009-09-20 18:45 UTC (permalink / raw)
  To: Bruce Korb; +Cc: git

Bruce Korb <bruce.korb@gmail.com> writes:

> Since I haven't created any any branches (to my knowledge), it seems
> that "master" is the magic branch name.

I wouldn't say "magic", but surely the default ;-).

> My goal was just to get a list of managed files.

Just cd /where/your/repo/is
git ls-files

> Is "master" going to remain my "HEAD" now?

Yes.

>> 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).
>
> $ git --version
> git version 1.6.0.2
>
> I guess the man pages and installation were out of sync for that release.

Well, actually, a few more instances of dashed commands were removed
more recently. That said, to get the doc for "git foo", you still have
to type "man git-foo" (or git foo --help indeed), but that's because
"man git foo" means something different to man.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

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

* Re: Documentation problems
  2009-09-20 17:58 Documentation problems Bruce Korb
  2009-09-20 18:24 ` Matthieu Moy
@ 2009-09-20 20:52 ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2009-09-20 20:52 UTC (permalink / raw)
  To: Bruce Korb; +Cc: git

Bruce Korb <bruce.korb@gmail.com> writes:

> 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

See gitglossary(7).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

end of thread, other threads:[~2009-09-20 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-20 17:58 Documentation problems Bruce Korb
2009-09-20 18:24 ` Matthieu Moy
2009-09-20 18:37   ` Bruce Korb
2009-09-20 18:45     ` Matthieu Moy
2009-09-20 20:52 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).