Skip to content

Commit 8db3865

Browse files
committed
Merge branch 'pw/p4-submit-conflicts'
Add '--conflict' option to git-p4 subcommand to specify what action to take when conflicts are found during 'p4 submit'. * pw/p4-submit-conflicts: git-p4: add submit --conflict option and config varaiable git p4: add submit --prepare-p4-only option git p4: add submit --dry-run option git p4: accept -v for --verbose git p4: revert deleted files after submit cancel git p4: rearrange submit template construction git p4: test clean-up after failed submit, fix added files git p4: standardize submit cancel due to unchanged template git p4: move conflict prompt into run, add [q]uit input git p4: remove submit failure options [a]pply and [w]rite git p4: gracefully fail if some commits could not be applied git p4 test: remove bash-ism of combined export/assignment
2 parents 3387423 + 6bbfd13 commit 8db3865

File tree

7 files changed

+709
-107
lines changed

7 files changed

+709
-107
lines changed

Documentation/git-p4.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ All commands except clone accept these options.
163163
--git-dir <dir>::
164164
Set the 'GIT_DIR' environment variable. See linkgit:git[1].
165165

166-
--verbose::
166+
--verbose, -v::
167167
Provide more progress information.
168168

169169
Sync options
@@ -269,6 +269,24 @@ These options can be used to modify 'git p4 submit' behavior.
269269
Export tags from git as p4 labels. Tags found in git are applied
270270
to the perforce working directory.
271271

272+
--dry-run, -n::
273+
Show just what commits would be submitted to p4; do not change
274+
state in git or p4.
275+
276+
--prepare-p4-only::
277+
Apply a commit to the p4 workspace, opening, adding and deleting
278+
files in p4 as for a normal submit operation. Do not issue the
279+
final "p4 submit", but instead print a message about how to
280+
submit manually or revert. This option always stops after the
281+
first (oldest) commit. Git tags are not exported to p4.
282+
283+
--conflict=(ask|skip|quit)::
284+
Conflicts can occur when applying a commit to p4. When this
285+
happens, the default behavior ("ask") is to prompt whether to
286+
skip this commit and continue, or quit. This option can be used
287+
to bypass the prompt, causing conflicting commits to be automatically
288+
skipped, or to quit trying to apply commits, without prompting.
289+
272290
Rebase options
273291
~~~~~~~~~~~~~~
274292
These options can be used to modify 'git p4 rebase' behavior.
@@ -519,6 +537,10 @@ git-p4.labelExportRegexp::
519537
Only p4 labels matching this regular expression will be exported. The
520538
default value is '[a-zA-Z0-9_\-.]+$'.
521539

540+
git-p4.conflict::
541+
Specify submit behavior when a conflict with p4 is found, as per
542+
--conflict. The default behavior is 'ask'.
543+
522544
IMPLEMENTATION DETAILS
523545
----------------------
524546
* Changesets from p4 are imported using git fast-import.

0 commit comments

Comments
 (0)