POV-Ray : Newsgroups : povray.off-topic : Git tutorial : Re: Git tutorial Server Time
30 Jul 2024 04:20:22 EDT (-0400)
  Re: Git tutorial  
From: Darren New
Date: 29 Apr 2011 12:16:34
Message: <4dbae462$1@news.povray.org>
On 4/29/2011 2:55, Orchid XP v8 wrote:
> You understand that Darcs *does* have an ordering between *related* patches,

Yes, I figured that.

Indeed, that's my main complaint with the whole concept: the idea that 
simply because two patches are in different files doesn't mean they're 
unrelated. If I implement foo() in file abc.c and call foo() in file def.c, 
those are not two unrelated patches.

> right? It's only *unrelated* patches that have no order relationship. I can
> flip the same line of code back and forth 20 times, and record that as 20
> patches, and they will have a strictly linear ordering.


So, you clone a repository and I clone a repository.

You create a file called XX with the line Hello in it.

I create a file called XX with the line Goodbye in it.

We both record our changes.

I then change my XX file to say "Hello\nGoodbye".

You change your XX to say "Goodbye\nHello".

We both record our changes.

I then change my XX file to say "Hello". You change yours to say "Goodbye".

We both record our changes.

We attempt to merge our repositories.

Can you try this on a blank repository on your machine and tell me what happens?

Resolving this in git is very straightforward. You can just pick one that's 
right and say "Henceforth, that's the answer". Or you can just grab all the 
changes and basically never merge them back together again (say, if you have 
two distros in the same repository).

Also, what happens if I rename a file from XXX to YYY and you rename it from 
XXX to ZZZ?  Do I wind up with both YYY and ZZZ in my repository?

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.