chiark / gitweb /
Overwrite: Document --overwrite=VERSION
[dgit.git] / dgit
diff --git a/dgit b/dgit
index c0d2183138945b2181e590efeb324092ddeecf48..4e31605adbf711c3c68232f17085d3eb2b586841 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2769,10 +2769,10 @@ END
        } else {
            fail "dgit push: HEAD is not a descendant".
                " of the archive's version.\n".
-               "dgit: To overwrite its contents,".
-               " use git merge -s ours ".lrref().".\n".
-               "dgit: To rewind history, if permitted by the archive,".
-               " use --deliberately-not-fast-forward";
+               "To overwrite the archive's contents,".
+               " pass --overwrite[=VERSION].\n".
+               "To rewind history, if permitted by the archive,".
+               " use --deliberately-not-fast-forward.";
        }
     }
 
@@ -4561,6 +4561,9 @@ sub parseopts () {
            } elsif (m/^--no-rm-on-error$/s) {
                push @ropts, $_;
                $rmonerror = 0;
+           } elsif (m/^--overwrite=(.*)$/s) {
+               push @ropts, $_;
+               $overwrite_version = $1;
            } elsif (m/^--(no-)?rm-old-changes$/s) {
                push @ropts, $_;
                $rmchanges = !$1;