From d82657683a77446101a644dec66fd0b83d18bf95 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 20 Aug 2018 00:24:18 +0100 Subject: git-debrebase: Provide hints for unprocessable commits Depending on the apparent branch ffq state. Closes:#905005. In particular, if it doesn't look like this branch was ever used with gdr, suggest that the user is on the wrong branch, or needs to use convert-from-*. Closes:#905279. Signed-off-by: Ian Jackson --- debian/changelog | 3 +++ git-debrebase | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 058ce00..3fe4ea8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,9 @@ dgit (6.7~) unstable; urgency=medium debrebase-last indicate that we are already in gdr format. * git-debrebase: convert-from-*: leave debrebase-last refs to hint to everyone that this is now a gdr branch. + * git-debrebase: Provide hints for unprocessable commits, depending + on the apparent branch ffq state, including possible suggestion + to use convert-from-*. Closes:#905005. Closes:#905279. -- diff --git a/git-debrebase b/git-debrebase index 484fcdc..4bfe095 100755 --- a/git-debrebase +++ b/git-debrebase @@ -441,7 +441,44 @@ sub record_gdrlast ($$;$) { sub fail_unprocessable ($) { my ($msg) = @_; - fail $msg; + changedir $maindir; + my ($ffqs, $ffqm, $symref, $ffq_prev, $gdrlast) = ffq_prev_branchinfo(); + + my $mangled = <