git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Which file is older in history?
@ 2013-03-20 20:21 Ramkumar Ramachandra
  2013-03-20 20:46 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Ramkumar Ramachandra @ 2013-03-20 20:21 UTC (permalink / raw)
  To: Git List

Hi,

I want to compare two files in a git repository and tell which one was
introduced into the repository earlier, assuming that they're in the
same history line (by ancestry, not timestamp).  The naive way to do
this is to find the individual commits that introduced the files
(`rev-list HEAD -- <filename> | tail -n 1`), and query whether there
are commits between them (`rev-list commit1 ^commit2`). However, this
is slow.  What about bisecting the history until we find a tree that
contains one file but not the other?

Thanks.

Ram

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

end of thread, other threads:[~2013-03-21 13:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 20:21 Which file is older in history? Ramkumar Ramachandra
2013-03-20 20:46 ` Junio C Hamano
2013-03-21 11:59   ` Ramkumar Ramachandra
2013-03-21 12:21     ` Jeff King
2013-03-21 12:24       ` Jeff King
2013-03-21 12:32         ` Ramkumar Ramachandra
2013-03-21 13:26           ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).