[kwlug-disc] DVCS advice needed

Adam Glauser adamglauser at gmail.com
Mon Oct 5 12:06:57 EDT 2009

Kyle Spaans wrote:
> On Mon, Oct 5, 2009 at 10:48 AM, Darcy Casselman <dscassel at gmail.com> wrote:
>> On Sun, Oct 4, 2009 at 1:31 PM, Adam Glauser <adamglauser at gmail.com> wrote:
>>> I've seen some comments that Git can track code as it moves between files.
>>>  Is this true, and if so, how does this look in practice?  Can the other
>>> DVCSes do this?
>> I know Bazaar can't.  I'm skeptical about how well git can.
>> What makes me skeptical is that I want to run something like 'git
>> blame' and see the history of that *file* since it was created, no
>> matter how many times it was renamed or moved.  I don't see how it can
>> do that unless you tell it that that new file in that directory is
>> actually that old file in the other directory.
> Ahh, so that's what he means. I'm kind of skeptical too, since `git mv`
> for moving and renaming seems to show up in the history as "Deleted file
> A, and created file A`". Though then I `git blame` or `git log` one of my
> `git mv`'d files, I can see it's complete history (from before and after the
> move or rename). Is that what you are looking for?

Actually, that's not what I meant.  I'm not sure yet how much file 
renaming might matter to us, but it's good to know how git handles it.

The bit I read that interested me was an answer[1] on StackOverflow.
 > Git has a unique concept of tracking file contents, even as those
 > contents move between files, and views files as first-level objects,
 > but does not track directories.

My interpretation was that if a procedure is moved from one file to 
another, say due to refactoring, that git would somehow know about it. 
I don't really see how that could work, but it seems like it could be 
very exciting if such tracking could work well.


More information about the kwlug-disc mailing list