From: Ian Jackson Date: Sat, 11 Aug 2018 10:43:40 +0000 (+0100) Subject: git-debrebase: merge: Comment about laundry of merge of unstitched X-Git-Tag: archive/debian/6.7~136 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=e8ab02477159b5bd91a3566dc28367ed4a910b3a git-debrebase: merge: Comment about laundry of merge of unstitched I have concluded that this is not a problem avoidable by git-debrebase, and that any trouble will be tolerable (at least, not data loss). The user should try to avoid doing this. Signed-off-by: Ian Jackson --- diff --git a/git-debrebase b/git-debrebase index c463f4ac..2b257dd6 100755 --- a/git-debrebase +++ b/git-debrebase @@ -1082,8 +1082,16 @@ sub walk ($;$$$) { } die "$ty ?"; } elsif ($ty eq 'VanillaMerge' or $ty eq 'MergedBreakwaters') { - # xxx need to handle ffq if one side was unstitched - # wait both of them may be! + # User may have merged unstitched branch(es). We will + # have now lost what ffq-prev was then (since the later + # pseudomerge may introduce further changes). The effect + # of resolving such a merge is that we may have to go back + # further in history to find a merge base, since the one + # which was reachable via ffq-prev is no longer findable. + # This is suboptimal, but if it all works we'll have done + # the right thing. + # xxx we should warn the user in the docs about this + my $ok=1; my $best_anchor; # We expect to find a dominating anchor amongst the diff --git a/tests/tests/gdr-merge b/tests/tests/gdr-merge index 25b2ee0a..baffedfc 100755 --- a/tests/tests/gdr-merge +++ b/tests/tests/gdr-merge @@ -59,12 +59,6 @@ t-git-debrebase scrap t-some-changes after t-git-debrebase -# xxx want to check that we DTRT if we start out unstitched - -# xxx should consider our ffq-prev as a parent -# xxx or should we ? it's not a parent of the merge is it ? -# xxx => user should prefer to make merges when stitched ? -# xxx think about this later - # t-gdr-good laundered # xxx ^ this does not work