diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-19 23:25:48 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-19 23:43:08 +0100 |
commit | 8f28dfa084b6d63e385d7fe538214eee2f90ea9e (patch) | |
tree | 6af6b90b3c12ff02ab8a2c718e4f0e09249a3885 | |
parent | 3367a5049a0032c13023bdb930c0c80bc326c49c (diff) |
git-debrebase: Snag on repeated conversions
If debrebase-last says we are ahead of some previous gdr work, it is
carrying on is unlikely to be helpful. It would only be sensible if
the package is vacillating between branch formats, and this is
reflected and visible in the branch history.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | git-debrebase | 3 | ||||
-rwxr-xr-x | tests/tests/gdr-import-dgitview | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 614a576..3ac55a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ dgit (6.7~) unstable; urgency=medium * git-debrebase: convert-from-gbp: Improve messages. Closes:#906641. * git-debrebase: Highly experimental merge resolution support, enabled only with special command line option. + * git-debrebase: Check in convert-from-* whether ffq-prev or + debrebase-last indicate that we are already in gdr format. -- diff --git a/git-debrebase b/git-debrebase index 059d02b..d80c8d3 100755 --- a/git-debrebase +++ b/git-debrebase @@ -2416,6 +2416,9 @@ sub begin_convert_from () { fail "ffq-prev exists, this is already managed by git-debrebase!" if $ffq_prev && git_get_ref $ffq_prev; + snag 'already-converted', + "ahead of debrebase-last, this is already managed by git-debrebase!" + if $gdrlast && git_get_ref $gdrlast && is_fast_fwd $gdrlast, $head; return ($head, undef); } diff --git a/tests/tests/gdr-import-dgitview b/tests/tests/gdr-import-dgitview index 3670deb..18d06f5 100755 --- a/tests/tests/gdr-import-dgitview +++ b/tests/tests/gdr-import-dgitview @@ -38,7 +38,8 @@ t-ref-head t-git-debrebase --noop-ok convert-from-dgit-view t-ref-head -t-git-debrebase convert-from-dgit-view --always-convert-anyway +t-git-debrebase -falready-converted convert-from-dgit-view \ + --always-convert-anyway t-expect-fail E:'ref varies' t-ref-head t-gdr-good laundered |