public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pal-Kristian Engstad <pal_engstad@naughtydog•com>
To: Simon Hausmann <simon@lst•de>, Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org
Subject: [PATCH 1/3] git-p4: default submit to use rename detection
Date: Thu, 21 Jan 2010 18:03:36 -0800	[thread overview]
Message-ID: <4B590778.30403@naughtydog.com> (raw)

Enable git's rename detection by default. This is needed to preserve
Perforce's history.

Removed the '-M' flag and added a '--no-detect' flag to preserve the
old behavior.

Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog•com>
---
 contrib/fast-import/git-p4 |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 48059d0..c65ef8a 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -543,13 +543,14 @@ class P4Submit(Command):
         self.options = [
                 optparse.make_option("--verbose", dest="verbose", action="store_true"),
                 optparse.make_option("--origin", dest="origin"),
-                optparse.make_option("-M", dest="detectRename", action="store_true"),
+                optparse.make_option("--no-detect", dest="detectRename", action="store_false",
+                                     help="Disable git's rename detection, forcing \"p4 delete\" and \"p4 add\" instead of \"p4 integrate\" and \"p4 edit\""),
         ]
         self.description = "Submit changes from git to the perforce depot."
         self.usage += " [name of git branch to submit into perforce depot]"
         self.interactive = True
         self.origin = ""
-        self.detectRename = False
+        self.detectRename = True
         self.verbose = False
         self.isWindows = (platform.system() == "Windows")
 
-- 
1.6.5.2.6.gc3c1e.dirty

             reply	other threads:[~2010-01-22  2:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-22  2:03 Pal-Kristian Engstad [this message]
2010-01-22  2:42 ` [PATCH 1/3] git-p4: default submit to use rename detection Nicolas Pitre
2010-01-22  3:01   ` Pal-Kristian Engstad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B590778.30403@naughtydog.com \
    --to=pal_engstad@naughtydog$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=simon@lst$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox