From 0e732ee5b3a5e01d68ce4331683453890fff7adf Mon Sep 17 00:00:00 2001 From: Davide Guerri Date: Wed, 23 Jul 2014 10:18:14 +0100 Subject: [PATCH] Add KNOWN-ISSUES.md file Add KNOWN-ISSUES.md file with the description of a git-upstream known bug. --- AUTHORS | 8 ++++++++ ChangeLog | 0 DESCRIPTION | 2 ++ KNOWN-ISSUES.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 +++ 5 files changed, 57 insertions(+) create mode 100644 AUTHORS create mode 100644 ChangeLog create mode 100644 KNOWN-ISSUES.md diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..6340741 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,8 @@ +Darragh Bailey +Davide Guerri +Jon-Paul Sullivan +Monty Taylor + +This list has been extracted with: + +git log --format='%aN <%aE>' | grep -v Jenkins | sort -u \ No newline at end of file diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/DESCRIPTION b/DESCRIPTION index 53f1f86..d8c3a74 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,3 +8,5 @@ patches on top of upstream repositories. It provides commands to ease the use of git for who needs to integrate big upstream projects in their environment (i.e., feature branch creation/finishing, release starting/finishing). The operations are performed using Git commands. + +See also README.md, USAGE.md and KNOWN-ISSUES.md files. \ No newline at end of file diff --git a/KNOWN-ISSUES.md b/KNOWN-ISSUES.md new file mode 100644 index 0000000..0c5497a --- /dev/null +++ b/KNOWN-ISSUES.md @@ -0,0 +1,44 @@ +# git-upstream import could miss some local changes + +## Problem description + +If previous local changes were based off of a point before the previous import merge was complete, and were not rebased to be applied after this point before being merged, the import command will miss including these when discarding previous obsolete history. + +Given a previous import like the following where previously changes B & C were replayed, and the import was merged as E. Where subsequently a change D which was proposed before the import, is merged to mainline, a subsequent run of the tool to import K will fail to include D along with B', C' & G' when discarding the assumed unnecessary merges E & F. While these should be discarded, the tool needs to check to make sure if there are dangling changes that should be included. + + D---- + / \ + B---C---E---F---L mainline + / / + / B'--C' import/G + / / + A---G---H---I---J---K upstream + + + +The tool will find the following commit path to consider: + + E---F---L + / + B'--C' + / + G + +## Implementing a fix (WiP) + +With respect to the previous diagrams, the correct behaviour is to find the following set: + + D---- + \ + E---F---L + / + B'--C' + / + G + +This requires walking the list of initial found (2nd diagram) and examining each merge commit up to the previous import to see if there is a change that shares history with the other parent. i.e. look at F and see if D contains a merge-base in common with E, an thus include. Or locate E and find any differences between E & L that should be included. + +## Workaround + +Waiting for a proper fix to be implemented, a workaround for this issue would be to perform the import only into a branch (usually master) which has no "pending" commit in other branches to be merged. +For gerrit this means not having pending reviews spanning across different git-upstream import command runs. diff --git a/README.md b/README.md index 8b7ca29..f79a747 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,9 @@ To show a specific note run `git notes --ref refs/notes/upstream-merge show .