Re: svn versus git
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 14, 2006, 09:44 UTC
- Message-ID
- <7vodq695ha.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200612140908.36952.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 11 quoted lines
> On Wednesday 2006 December 13 22:56, Shawn Pearce wrote: > >> git cat-file -p $REV:$file >> >> not sure how much easier it gets than that. Load in the bash >> completion from contrib/completion and you can even tab complete >> the $file part. > > Yes. I was a little unfair on that one; I forgot about the REV:file syntax. > However, it's still not simple for a new user; I think I'd say "draw" if > the "-p" weren't a requirement.
I would say pretending as if cat-file is a Porcelain is the unfair part.
Show 6 quoted lines
> $ git-ls-tree v1.0.0 > 100644 blob 906e98492080d2fde9467a9970fc92d7a8cfeaf8 Makefile > > I'm a newbie: what's that number at the front? What's a blob? What's that > great big number - I've only seen commit hashes that look like that, and that > isn't one. Definitely not friendly.
Again, mistaking ls-tree as if it was a Porcelain is the true cause of the newbie confusion.
> It could probably be fixed by making git-ls-files capable of understanding > tree-ish.
I think that's a wrong way to go about. The primary purpose of ls-files is to read the index and show information around it; ls-tree is about reading one tree and show information around it. They are both plumbing and meant to be used by scripts when they want to inspect the index or a tree respectively.
If a Porcelain level "ls" is needed (and I am doubtful about usefulness of "svn list -r538" like command), that is the command you would want to teach about using ls-files and ls-tree depending on what the end users want in their workflow.