Re: Cherry-pick particular object

From: Linus Torvalds <torvalds@osdl.org>
Date: 2006-03-29 09:44:02
On Tue, 28 Mar 2006, sean wrote:
> 
> $ git cat-file -t 78132af2643

Side note: when using git-ls-tree, the "blob"ness information is already 
in the tree output itself and you shouldn't even need to check the type 
with "-t". So what is perhaps somewhat more interesting is actually the 
mode of the file, since that determines whether the blob should be 
interpreted as regular file content or as a symlink.

Ie you can have a tree like this:

	100644 blob f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f    abc
	120000 blob f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f    file

where the first one is a regular file called "abc" (which contains the 
string "abc"), and the second is the _symlink_ that points to "abc".

They share the exact same blob, and what distinguishes them is the 
filemode info from git-read-tree.

Of course, the symlink case isn't very common and likely not very 
interesting in this case, but the fact that "git ls-files" is set up so 
that you can just cut-and-paste the "blob <sha1-of-blob" part and feed it 
to git-cat-file was definitely not just coincidence.

(A number of the early stuff was set up so that I could do things by hand 
by just doing cut-and-paste of the output of the previous command. Git has 
come a long way in the last 12 months ;)

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Mar 29 09:44:43 2006

This archive was generated by hypermail 2.1.8 : 2006-03-29 09:44:58 EST