Re: Cherry-pick particular object

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

 




On Wed, 29 Mar 2006, Petr Baudis wrote:

> Dear diary, on Wed, Mar 29, 2006 at 12:44:02AM CEST, I got a letter
> where Linus Torvalds <torvalds@xxxxxxxx> said that...
> > 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.
> 
> Huh? Didn't you rather want to say that "file" will point to a blob
> containing just the "abc" string (the symlink target)? ;-)

Well no, maybe I should have called the first file something else.

Both "abc" and "file" from a git perspective have the same _contents_ (the 
blob containing the data 'abc'). 

But the filemode means that those contents have totally different meaning. 
For the pth "file", it means that it's a _symlink_ to "abc", while for the 
path "abc" it's a regular file that just has the _contents_ "abc".

So the end _result_ of this is that "file" points to a file called "abc" 
that also has the contents "abc", and "cat file abc" will result in 
"abcabc".

IOW, this is the result of doing

	echo -n abc > abc
	ln -s abc file

and importing the mess into git.

		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]