1 |
On 8 May 2016 at 23:57, Rich Freeman <rich0@g.o> wrote: |
2 |
> How does a merge make it any easier/harder to mess up the entire tree? |
3 |
> I can see how they can make the history easier/harder to read but in |
4 |
> the end I believe the content of the tree itself ends up being |
5 |
> whatever was in the index when you made the commit. |
6 |
> |
7 |
>> |
8 |
>> * The only alternative would be to come up with criteria for merges and |
9 |
>> actually enforce them (meaning, if you mess up the tree more than twice you |
10 |
>> lose your push access. Hello QA.). |
11 |
>> |
12 |
> |
13 |
> Here is the other only alternative: use rebase commits when they're |
14 |
> most appropriate, and use merge commits when they're most appropriate, |
15 |
> and publish easy-to-understand guidelines for when each is the case. |
16 |
> I don't really see a need for hard rules unless we think devs can |
17 |
> actually comply with them. Do we really want somebody to lose their |
18 |
> commit access because they pushed a string of rebased commits that |
19 |
> might have been more appropriate as a single merge commit? |
20 |
> |
21 |
> Both types of commits have their place. I think that bans are better |
22 |
> used for bad attitude than for mistakes. I don't think you need a |
23 |
> 100% rigid rule to enforce a ban either - this isn't a court of law |
24 |
> (and I think many of the failings of courts of law result from the |
25 |
> rigid application of rules, but that is a different matter). |
26 |
|
27 |
I'd probably say any case where you have to resolve a conflict in the |
28 |
merge commit is a clear indicator that the right branch needed |
29 |
rebasing prior to merging, either way. |
30 |
|
31 |
mostly, because it means some change on the right side becomes |
32 |
transiently dependent on a change on the left side, and its obscured |
33 |
by the resolution mid-merge. |
34 |
|
35 |
( And such conflicts tend not to be even obvious that they've existed |
36 |
when traversing a history with merge commits, because "merge diffs" |
37 |
get suppressed by default ). |
38 |
|
39 |
And its usually not clear what the "Solution" is when you're simply |
40 |
comparing 2 heads. |
41 |
|
42 |
With a rebase, you know exactly what the expected change is at the |
43 |
commit that makes the change, and the rebase lets you see what the |
44 |
existing state was at the time of applying the change. |
45 |
|
46 |
Merges without conflicts however are much less contentious. |
47 |
|
48 |
In short, if you get a merge conflict, then somebody needs to pay more |
49 |
attention to what happened on one side of the changes, and one side of |
50 |
that equation should be rebased to avoid that conflict. |
51 |
|
52 |
|
53 |
-- |
54 |
Kent |
55 |
|
56 |
KENTNL - https://metacpan.org/author/KENTNL |