Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Igor Djordjevic
Hi Matevz,

On Thursday, May 18, 2017 at 12:22:09 AM UTC+2, matevz...@borea.si wrote:
>
> thanks for your help, I would give up otherwise, but now I managed to get 
> this working with a special git merge script that automatically performs 
> merge from A to B and vice versa by ignoring (with git merge -s ours) all 
> opposite commits created by automated merge script (by itself), 
>

Would you mind sharing the script, please? I`m curious to see what works 
for you, still struggling to comprehend what benefits merging provides in 
your use-case.
 

> Also with "git merge -s ours" we can select which parts of the history we 
> want to carry forward and which parts not. After performing single merge 
> with -s ours for certain part of the history git will no longer complain 
> about that in future merges (even normal merges) as it has already marked 
> it as merged.
>

This is true, but this "fake merge" is usually used for single way merging 
only, where you`re disregarding part of the history of the branch you`re 
merging from (say, A), kind of declaring it obsolete/superseded by the 
branch you`re merging into (say, B), but keeping the reference to it. Then 
you can keep merging in the same direction (from A to B), having only new A 
commits being included in the the future merge(s) to B.

But as soon as you try to merge the other way around, hoping to merge only 
new commits from B to A, you may be surprised by the outcome, having 
changes contained in your "private" B commits coming along, too, with 
"private" A commit changes now actually being removed inside the very A 
branch - a behavior you already experienced in your simple test repository.

If you instead do another `git merge -s ours` but in a different direction 
first (from B to A), then merging the new commits found on B to A, this 
will work, but it kind of seems as a glorified cherry-picking...? Not sure 
if any advantages you`re looking for in merging, if any in this case, are 
worth the badly messed up history with these repetitive `-s ours` cross 
merges :/

Hey, but if it works for you, I guess all is good :) I`m just curious.

Regards,
Buga

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Igor Djordjevic
Hi Matevz,

On Wednesday, May 17, 2017 at 6:15:49 PM UTC+2, matevz...@borea.si wrote:
>
> I managed on simple repository with
> merge -s ours
> To ignore specific commits from the other side.
>
> However in real life repo things get broken pretty soon. A changes are 
> propagated to B and then back to A and are lost in A, but remain in B :-)
>

This is exactly what I referred to as "while possible to accomplish, may be 
rather confusing and greatly complicate our life down the road" in my 
initial reply[1]... :)

[1] https://groups.google.com/d/msg/git-users/ovqx55Fv6bY/vuirLMmXAgAJ

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Matevz . langus
Hi Igor,

yes, I was referring to "2 messages have been deleted"

I think this happened because I left Michael's email in my reply and Google 
was not too happy with several Youtube links in that reply. Deleting 
Michael's contents and only writing my reply into the message resolved.

thanks,
  Matevz

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Igor Djordjevic
On Wednesday, May 17, 2017 at 9:48:04 PM UTC+2, rh kramer wrote:
>
> I see no evidence your messages are being deleted from this list.  Are you 
> referring to something else?  You do know that (for some reason I don't 
> know) 
> messages that you send to most lists are either not sent back to you or, 
> at 
> least, are not displayed in typical mail clients?
>

Google Groups web interface shows "2 messages have been deleted" in the 
middle of the thread[1]. Not sure what happened, though, as no more info 
seems to be provided...?

[1] https://groups.google.com/forum/?fromgroups#!topic/git-users/ovqx55Fv6bY

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread rhkramer
I see no evidence your messages are being deleted from this list.  Are you 
referring to something else?  You do know that (for some reason I don't know) 
messages that you send to most lists are either not sent back to you or, at 
least, are not displayed in typical mail clients?

On Wednesday, May 17, 2017 11:32:31 AM matevz.lan...@borea.si wrote:
> Hi,
> 
> do you have any idea why my messages are being deleted?
> 
> regards,
>   Matevz


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Matevz Langus
Hi,

I managed on simple repository with
merge -s ours
To ignore specific commits from the other side.

However in real life repo things get broken pretty soon. A changes are 
propagated to B and then back to A and are lost in A, but remain in B :-)
Matevz Langus

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Michael
Then I think it should be possible.
Just need to know how to tell merge to only look at changes from "start of A's 
mergeable's changes to tip of A".
And I don't know that.

Or:
Should be possible
Limit merging to a range
How do you do that?

(Haiku because ... haiku)

On 2017-05-17, at 8:54 AM, Matevz Langus  wrote:

> Hi,
> 
> 1,2,3 yes.
> 
> 4: no, 100% of updates go from A to B and vice versa
> 
> thanks,
>  Matevz
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Matevz Langus

Hi,

1,2,3 yes.

4: no, 100% of updates go from A to B and vice versa

thanks,
  Matevz

--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Michael

On 2017-05-17, at 8:35 AM, matevz.lan...@borea.si wrote:

> Hi,
> 
> orphaned branch would work, but is very inconvenient for the process we have.
> 
> we would like for some people to work on A and commit patches to A.
> other people to work on B and commit patches on B.
> 
> Once a week we would like to get all A patches propagated to B and all B 
> patches propagated to A.
> 
> We would like to do that without cherry-picking as git's merge is really 
> fantastical and never forgets.

So:

1. You want to have a "common" "center" branch
2. You want to merge everything on A after a certain point to common
3. You want to merge everything on B after a certain point to common

(i.e. -- instead of everything from "start-of-history .. A", it's 
"end-of-client-specific .. A")

... I'll let someone else indicate if it's possible for merge to only take 
portions of a history like that.

And you want to merge that common back to both branches so that A's and B's 
updates are cross-propagated.

BUT:
4. This is only for about 95% of the updates to A and B -- a few things are 
still going to be side specific.

Is that correct?

I think 4 might just kill your use of git.

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Matevz . langus
Hi,

orphaned branch would work, but is very inconvenient for the process we 
have.

we would like for some people to work on A and commit patches to A.
other people to work on B and commit patches on B.

Once a week we would like to get all A patches propagated to B and all B 
patches propagated to A.

We would like to do that without cherry-picking as git's merge is really 
fantastical and never forgets.

thanks,
  Matevz

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Matevz . langus
Hi,

do you have any idea why my messages are being deleted?

regards,
  Matevz

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Michael
AHH...

So what you want is a new, orphaned branch of changes, and you want to merge 
that new branch into both A and B. Correct?

I'll let someone that knows how to set that up chime in.

On 2017-05-17, at 6:33 AM, matevz.lan...@borea.si wrote:

> Hi,
> 
> 
> You have a common source "master".
> You have two very large sets of changes from master, A and B.
> You need to apply patches to both A and B. These patches will apply cleanly 
> to both.
> But these patches will not apply to the last common "master" where A and B 
> diverged.'
> 
> Is that correct so far?
> 
>  CORRECT. 99% of cases they will apply cleanly on both, 1% with conflicts.
> Some of the patches might even apply to "old common master", but it would not 
> compile or not work if it would compile. Old master is a third branch we do 
> not want to maintain because it is useless without very large sets of changes 
> in A and B.
> 
> regards,
>   Matevz
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] keeping two branches with partially different history in sync

2017-05-17 Thread Matevz . langus
Hi,


> You have a common source "master".
> You have two very large sets of changes from master, A and B.
> You need to apply patches to both A and B. These patches will apply 
> cleanly to both.
> But these patches will not apply to the last common "master" where A and B 
> diverged.'
>
> Is that correct so far?
>

 CORRECT. 99% of cases they will apply cleanly on both, 1% with conflicts.
Some of the patches might even apply to "old common master", but it would 
not compile or not work if it would compile. Old master is a third branch 
we do not want to maintain because it is useless without very large sets of 
changes in A and B.

regards,
  Matevz

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.