From f55b87c1c748cdec7ce1631e6296e3edfd7cfc7d Mon Sep 17 00:00:00 2001 From: Romain Merland Date: Fri, 1 Jun 2018 09:46:14 +0200 Subject: git-p4: add options --commit and --disable-rebase On a daily work with multiple local git branches, the usual way to submit only a specified commit was to cherry-pick the commit on master then run git-p4 submit. It can be very annoying to switch between local branches and master, only to submit one commit. The proposed new way is to select directly the commit you want to submit. Add option --commit to command 'git-p4 submit' in order to submit only specified commit(s) in p4. On a daily work developping software with big compilation time, one may not want to rebase on his local git tree, in order to avoid long recompilation. Add option --disable-rebase to command 'git-p4 submit' in order to disable rebase after submission. Thanks-to: Cedric Borgese Reviewed-by: Luke Diamand Signed-off-by: Romain Merland Signed-off-by: Junio C Hamano --- Documentation/git-p4.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index d8c8f11c9f..88d109debb 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -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 +$ git p4 submit --commit +------------ + The upstream reference is generally 'refs/remotes/p4/master', but can be overridden using the `--origin=` command-line option. @@ -330,6 +336,14 @@ These options can be used to modify 'git p4 submit' behavior. p4/master. See the "Sync options" section above for more information. +--commit |:: + 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. + Rebase options ~~~~~~~~~~~~~~ These options can be used to modify 'git p4 rebase' behavior. -- cgit v1.2.3