Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: post-update script to update wc - version 2

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:18

"Alex Riesen" [off-list ref] writes:
On 6/27/07, Sam Vilain [off-list ref] wrote:
quoted
Sam Vilain wrote:
quoted
        this_tree=`git-cat-file commit $commit | awk '/^tree/ { print $2; exit }'`
Of course on newer git, `git-rev-parse $commit:` will do that.
Are you sure? Maybe you mean git-rev-parse "$commit"^{tree}?
I had the same "Huh?"  moment as you had, but what Sam said is
correct.  He is being too clever to confuse us ;-).

When "$commit" is a tree-ish,

	$commit:$path

is the name of the tree or blob object at that $path, and as 
very strange special case, an empty $path is the whole tree.

It's been this way since early this year (before v1.5.0-rc1),
thanks to Jeff King.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help