{"thread":{"id":"22331","subject":"[PATCH 1/3] git-p4: default submit to use rename detection","startedAt":"2010-01-22T02:03:36Z","lastAt":"2010-01-22T03:01:30Z","messageCount":3,"participants":["Pal-Kristian Engstad","Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"132357","messageId":"4B590778.30403@naughtydog.com","threadId":"22331","inReplyTo":null,"subject":"[PATCH 1/3] git-p4: default submit to use rename detection","fromName":"Pal-Kristian Engstad","fromEmail":"pal_engstad@naughtydog.com","sentAt":"2010-01-22T02:03:36Z","receivedAt":"2010-01-22T02:03:36Z","isPatch":true,"sender":{"key":"pal_engstad@naughtydog.com","avatar":null},"body":"Enable git's rename detection by default. This is needed to preserve\nPerforce's history.\n\nRemoved the '-M' flag and added a '--no-detect' flag to preserve the\nold behavior.\n\nSigned-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>\n---\n contrib/fast-import/git-p4 |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex 48059d0..c65ef8a 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -543,13 +543,14 @@ class P4Submit(Command):\n         self.options = [\n                 optparse.make_option(\"--verbose\", dest=\"verbose\", action=\"store_true\"),\n                 optparse.make_option(\"--origin\", dest=\"origin\"),\n-                optparse.make_option(\"-M\", dest=\"detectRename\", action=\"store_true\"),\n+                optparse.make_option(\"--no-detect\", dest=\"detectRename\", action=\"store_false\",\n+                                     help=\"Disable git's rename detection, forcing \\\"p4 delete\\\" and \\\"p4 add\\\" instead of \\\"p4 integrate\\\" and \\\"p4 edit\\\"\"),\n         ]\n         self.description = \"Submit changes from git to the perforce depot.\"\n         self.usage += \" [name of git branch to submit into perforce depot]\"\n         self.interactive = True\n         self.origin = \"\"\n-        self.detectRename = False\n+        self.detectRename = True\n         self.verbose = False\n         self.isWindows = (platform.system() == \"Windows\")\n \n-- \n1.6.5.2.6.gc3c1e.dirty\n"},{"id":"132366","messageId":"alpine.LFD.2.00.1001212139540.1726@xanadu.home","threadId":"22331","inReplyTo":"4B590778.30403@naughtydog.com","subject":"Re: [PATCH 1/3] git-p4: default submit to use rename detection","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-01-22T02:42:48Z","receivedAt":"2010-01-22T02:42:48Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:\n\n> Enable git's rename detection by default. This is needed to preserve\n> Perforce's history.\n> \n> Removed the '-M' flag and added a '--no-detect' flag to preserve the\n> old behavior.\n\nYou should keep the -M flag, even if it ends up doing nothing, for \nbackward compatibility.  And --no-detect is really a bad flag name.  \nMaybe --no-detect-renames instead?\n\n\nNicolas\n"},{"id":"132370","messageId":"4B59150A.8000002@naughtydog.com","threadId":"22331","inReplyTo":"alpine.LFD.2.00.1001212139540.1726@xanadu.home","subject":"Re: [PATCH 1/3] git-p4: default submit to use rename detection","fromName":"Pal-Kristian Engstad","fromEmail":"pal_engstad@naughtydog.com","sentAt":"2010-01-22T03:01:30Z","receivedAt":"2010-01-22T03:01:30Z","isPatch":true,"sender":{"key":"pal_engstad@naughtydog.com","avatar":null},"body":"Nicolas Pitre wrote:\n> On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:\n> \n>> Enable git's rename detection by default. This is needed to preserve\n>> Perforce's history.\n>>\n>> Removed the '-M' flag and added a '--no-detect' flag to preserve the\n>> old behavior.\n> \n> You should keep the -M flag, even if it ends up doing nothing, for \n> backward compatibility.  And --no-detect is really a bad flag name.  \n> Maybe --no-detect-renames instead?\n\nI'm not sure if git-p4 wants to keep backwards compatibility. I doubt there's\nmany scripts out there that calls git-p4, but Simon should decide.\n\nI have no problem with the --no-detect-renames flag, though.\n\nPKE.\n-- \nPål-Kristian Engstad (engstad@naughtydog.com), \nLead Graphics & Engine Programmer,\nNaughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North,\nSanta Monica, CA 90404, USA. Ph.: (310) 633-9112.\n\n\"Emacs would be a far better OS if it was shipped with \n a halfway-decent text editor.\" -- Slashdot, Dec 13. 2005.\n"}]}