From 84cb00036fb59cf0ff305dcc27551f0519b5098c Mon Sep 17 00:00:00 2001 From: Gary Gibbons Date: Wed, 4 Jul 2012 09:40:19 -0400 Subject: git p4: refactor diffOpts calculation P4Submit.applyCommit() To avoid recalculating the same diffOpts for each commit, move it out of applyCommit() and into the top-level run(). Also fix a bug in that code which interpreted the value of detectRenames as a string rather than as a boolean. [pw: fix documentation, rearrange code a bit] Signed-off-by: Gary Gibbons Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- Documentation/git-p4.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Documentation/git-p4.txt') diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index fe1f49bc6..8228f33e3 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -255,7 +255,7 @@ These options can be used to modify 'git p4 submit' behavior. p4. By default, this is the most recent p4 commit reachable from 'HEAD'. --M[]:: +-M:: Detect renames. See linkgit:git-diff[1]. Renames will be represented in p4 using explicit 'move' operations. There is no corresponding option to detect copies, but there are @@ -465,13 +465,15 @@ git-p4.useClientSpec:: Submit variables ~~~~~~~~~~~~~~~~ git-p4.detectRenames:: - Detect renames. See linkgit:git-diff[1]. + Detect renames. See linkgit:git-diff[1]. This can be true, + false, or a score as expected by 'git diff -M'. git-p4.detectCopies:: - Detect copies. See linkgit:git-diff[1]. + Detect copies. See linkgit:git-diff[1]. This can be true, + false, or a score as expected by 'git diff -C'. git-p4.detectCopiesHarder:: - Detect copies harder. See linkgit:git-diff[1]. + Detect copies harder. See linkgit:git-diff[1]. A boolean. git-p4.preserveUser:: On submit, re-author changes to reflect the git author, -- cgit v1.2.1