"git p4" updates.
* ld/git-p4-updates:
git-p4: auto-size the block
git-p4: narrow the scope of exceptions caught when parsing an int
git-p4: raise exceptions from p4CmdList based on error from p4 server
git-p4: better error reporting when p4 fails
git-p4: add option to disable syncing of p4/master with p4
git-p4: disable-rebase: allow setting this via configuration
git-p4: add options --commit and --disable-rebase
@ -149,6 +149,12 @@ To specify a branch other than the current one, use:
@@ -149,6 +149,12 @@ To specify a branch other than the current one, use:
$ git p4 submit topicbranch
------------
To specify a single commit or a range of commits, use:
------------
$ git p4 submit --commit <sha1>
$ git p4 submit --commit <sha1..sha1>
------------
The upstream reference is generally 'refs/remotes/p4/master', but can
be overridden using the `--origin=` command-line option.
@ -355,6 +361,19 @@ These options can be used to modify 'git p4 submit' behavior.
@@ -355,6 +361,19 @@ These options can be used to modify 'git p4 submit' behavior.
p4/master. See the "Sync options" section above for more
information.
--commit <sha1>|<sha1..sha1>::
Submit only the specified commit or range of commits, instead of the full
list of changes that are in the current Git branch.
--disable-rebase::
Disable the automatic rebase after all commits have been successfully
submitted. Can also be set with git-p4.disableRebase.
--disable-p4sync::
Disable the automatic sync of p4/master from Perforce after commits have
been submitted. Implies --disable-rebase. Can also be set with
git-p4.disableP4Sync. Sync with origin/master still goes ahead if possible.
Rebase options
~~~~~~~~~~~~~~
These options can be used to modify 'git p4 rebase' behavior.
@ -155,6 +155,46 @@ test_expect_success 'allow submit from branch with same revision but different n
@@ -155,6 +155,46 @@ test_expect_success 'allow submit from branch with same revision but different n
)
'
# make two commits, but tell it to apply only one
test_expect_success 'submit --commit one' '
test_when_finished cleanup_git &&
git p4 clone --dest="$git" //depot &&
(
cd "$git" &&
test_commit "file9" &&
test_commit "file10" &&
git config git-p4.skipSubmitEdit true &&
git p4 submit --commit HEAD
) &&
(
cd "$cli" &&
test_path_is_missing "file9.t" &&
test_path_is_file "file10.t"
)
'
# make three commits, but tell it to apply only range