chiark / gitweb /
Overwrite: Document --overwrite=VERSION
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 25 Sep 2016 20:21:59 +0000 (21:21 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Sep 2016 00:36:29 +0000 (01:36 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit
dgit.1

index 7143fe7d5b222cbc6782efd41e20e36fa1e371fe..625feddafc16502a0fadaa8b31390b2603b01fea 100644 (file)
@@ -26,6 +26,8 @@ dgit (1.5~~) unstable; urgency=medium
     in the toplevel the same way we treat ones in the toplevel.
   * When automatically generating quilt patch, honour GIT_COMMITTER_DATE
     for filename creation (makes filename deterministic in test suite).
     in the toplevel the same way we treat ones in the toplevel.
   * When automatically generating quilt patch, honour GIT_COMMITTER_DATE
     for filename creation (makes filename deterministic in test suite).
+  * New --overwrite option, replaces need to for user to use
+    git merge -s ours.  Closes:#838718.
 
   Infrastructure:
   * Better error handling in dgit-repos-policy-debian.
 
   Infrastructure:
   * Better error handling in dgit-repos-policy-debian.
diff --git a/dgit b/dgit
index 2bd938e5a1149017413ce7ee2d2015afe6c855e4..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".
        } 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.";
        }
     }
 
        }
     }
 
diff --git a/dgit.1 b/dgit.1
index 8769f72332c8f9e84a68abb7cc96f0013c4f52a2..039ee81722d12439f9d66036853973267af6ea29 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -641,14 +641,17 @@ archive and record it in the
 tracking branch.  Then somehow, using your other git history
 plus appropriate diffs and cherry picks from the dgit remote tracking
 branch, construct a git commit whose tree corresponds to the tree to use for the
 tracking branch.  Then somehow, using your other git history
 plus appropriate diffs and cherry picks from the dgit remote tracking
 branch, construct a git commit whose tree corresponds to the tree to use for the
-next upload.  If that commit-to-be-uploaded is not a descendant of the
-dgit remote tracking branch, check it out and say
-.BR "git merge -s ours remotes/dgit/dgit/" \fIsuite\fR;
-that tells git that we are deliberately throwing away any differences
+next upload. 
+
 between what's in the archive and what you intend to upload.
 Then run
 .BR "dgit push"
 to actually upload the result.
 between what's in the archive and what you intend to upload.
 Then run
 .BR "dgit push"
 to actually upload the result.
+
+If the commit-to-be-uploaded is not a descendant of the
+dgit remote tracking branch, you will need to pass
+.B --overwrite
+to dgit.
 .SH CONFIGURATION
 dgit can be configured via the git config system.
 You may set keys with git-config (either in system-global or per-tree
 .SH CONFIGURATION
 dgit can be configured via the git config system.
 You may set keys with git-config (either in system-global or per-tree