Git development
 help / color / mirror / Atom feed
* possible 'git cp'/how does git detect copies
@ 2008-06-27 12:40 Mircea Bardac
  2008-06-27 12:57 ` Santi Béjar
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mircea Bardac @ 2008-06-27 12:40 UTC (permalink / raw)
  To: git

I was looking today at duplicating a file but, I soon realized that 
there is no 'git cp' command (this was the "deductive approach to git 
commands", starting from git mv/rm/...). How does "git diff -C" detect 
copies (-C is used for this, according to the documentation)?

On a very simple test, I couldn't see this working. I just copied one 
file, added it, committed the change, ran "git diff -C HEAD^!". There is 
no place saying that it's contents is copied from some other file (both 
files are in the repository now).

"git blame -C new_copied_file" also doesn't show the commits for the 
original file.

This is all with 1.5.6.1.

I am probably missing something here... but I can't produce an example 
of copied contents that actually works. Any hint would be appreciated.

I found this older thread [1] on "git cp" but the discussion appears to 
have stalled at some point. If there is indeed no use of a "git cp" 
command, I would like at least some info on how content copies are being 
detected, since I haven't seen this working.

[1] http://kerneltrap.org/mailarchive/git/2008/2/3/705424


Many thanks,
Mircea

--
http://mircea.bardac.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-27 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27 12:40 possible 'git cp'/how does git detect copies Mircea Bardac
2008-06-27 12:57 ` Santi Béjar
2008-06-27 13:16   ` Mircea Bardac
2008-06-27 13:00 ` Pierre Habouzit
2008-06-27 13:09   ` Miklos Vajna
2008-06-27 13:05 ` Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox