git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] git-p4: default submit to use rename detection

From
PEPal-Kristian Engstad <pal_engstad@naughtydog.com>
Date
Jan 22, 2010, 02:03 UTC
Message-ID
<4B590778.30403@naughtydog.com>

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
Next: Nicolas Pitre
Message 1 of 3 in “git-p4: default submit to use rename detection”
  1. 1/3 git-p4: default submit to use rename detectionPal-Kristian Engstad, Jan 22, 2010
  2. Nicolas PitreJan 22, 2010
  3. Pal-Kristian EngstadJan 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.