From 16dd3ffe595a585adc0fffb7f4ab97b29807911b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 25 Sep 2016 21:21:59 +0100 Subject: Overwrite: Document --overwrite=VERSION Signed-off-by: Ian Jackson --- debian/changelog | 2 ++ dgit | 8 ++++---- dgit.1 | 11 +++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7143fe7..625fedd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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). + * 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. diff --git a/dgit b/dgit index 2bd938e..4e31605 100755 --- 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."; } } diff --git a/dgit.1 b/dgit.1 index 8769f72..039ee81 100644 --- 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 -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. + +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 -- cgit v1.2.3