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 <ggibbons@perforce.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a0327c0edc
commit
84cb00036f
@ -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[<n>]::
|
||||
-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,
|
||||
|
Reference in New Issue
Block a user