git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] git-p4: default submit to use rename detection
@ 2010-01-22  2:03 Pal-Kristian Engstad
  2010-01-22  2:42 ` Nicolas Pitre
  0 siblings, 1 reply; 3+ messages in thread
From: Pal-Kristian Engstad @ 2010-01-22  2:03 UTC (permalink / raw)
  To: Simon Hausmann, Junio C Hamano; +Cc: git

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] git-p4: default submit to use rename detection
  2010-01-22  2:03 [PATCH 1/3] git-p4: default submit to use rename detection Pal-Kristian Engstad
@ 2010-01-22  2:42 ` Nicolas Pitre
  2010-01-22  3:01   ` Pal-Kristian Engstad
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Pitre @ 2010-01-22  2:42 UTC (permalink / raw)
  To: Pal-Kristian Engstad; +Cc: Simon Hausmann, Junio C Hamano, git

On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:

> 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.

You should keep the -M flag, even if it ends up doing nothing, for 
backward compatibility.  And --no-detect is really a bad flag name.  
Maybe --no-detect-renames instead?


Nicolas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] git-p4: default submit to use rename detection
  2010-01-22  2:42 ` Nicolas Pitre
@ 2010-01-22  3:01   ` Pal-Kristian Engstad
  0 siblings, 0 replies; 3+ messages in thread
From: Pal-Kristian Engstad @ 2010-01-22  3:01 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: Simon Hausmann, Junio C Hamano, git@vger.kernel.org

Nicolas Pitre wrote:
> On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:
> 
>> 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.
> 
> You should keep the -M flag, even if it ends up doing nothing, for 
> backward compatibility.  And --no-detect is really a bad flag name.  
> Maybe --no-detect-renames instead?

I'm not sure if git-p4 wants to keep backwards compatibility. I doubt there's
many scripts out there that calls git-p4, but Simon should decide.

I have no problem with the --no-detect-renames flag, though.

PKE.
-- 
Pål-Kristian Engstad (engstad@naughtydog.com), 
Lead Graphics & Engine Programmer,
Naughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North,
Santa Monica, CA 90404, USA. Ph.: (310) 633-9112.

"Emacs would be a far better OS if it was shipped with 
 a halfway-decent text editor." -- Slashdot, Dec 13. 2005.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-22  3:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-22  2:03 [PATCH 1/3] git-p4: default submit to use rename detection Pal-Kristian Engstad
2010-01-22  2:42 ` Nicolas Pitre
2010-01-22  3:01   ` Pal-Kristian Engstad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).