Thread (14 messages) 14 messages, 5 authors, 2016-08-11

Re: svn versus git

flat view

From: Junio C Hamano <hidden>
Date: 2016-08-11 19:38:11

Andy Parkins [off-list ref] writes:
On Wednesday 2006 December 13 22:56, Shawn Pearce wrote:
quoted
  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.
$ 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help