chiark / gitweb /
Improve error message for non-fast-forward push. Closes: #720896.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Aug 2013 15:36:23 +0000 (16:36 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Aug 2013 15:36:23 +0000 (16:36 +0100)
debian/changelog
dgit

index d550745959fe262385877c8f274406c8116b0272..a30e469060cef72a6411705503b0df4b95dab51f 100644 (file)
@@ -2,6 +2,7 @@ dgit (0.12) unstable; urgency=low
 
   * Cope with packages with epoch.  Closes: #720897.
   * Add Closes line for #720595 to changelog entry for 0.11.
+  * Improve error message for non-fast-forward push.  Closes: #720896.
 
  --
 
diff --git a/dgit b/dgit
index f582be0e8ee39cd1a0e00275ec6c78d76c2100c3..71b042302dfa1e88eed02571bc47381e748f12a1 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -984,7 +984,10 @@ sub cmd_push {
        git_fetch_us();
     }
     if (fetch_from_archive()) {
-       is_fast_fwd(lrref(), 'HEAD') or die;
+       is_fast_fwd(lrref(), 'HEAD') or
+           fail "dgit push: HEAD is not a descendant".
+               " of the archive's version.\n".
+               "$us: To overwrite it, use git-merge -s ours ".lrref().".";
     } else {
        $new_package or
            fail "package appears to be new in this suite;".