Re: Cherry-pick particular object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]