git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCHv2 1/6] git-p4: disable-rebase: allow setting this via configuration

From
Luke Diamand <luke@diamand.org>
Date
Jun 8, 2018, 20:32 UTC
Message-ID
<20180608203248.16311-2-luke@diamand.org>
In-Reply-To
<20180608203248.16311-1-luke@diamand.org>

This just lets you set the --disable-rebase option with the git configuration options git-p4.disableRebase. If you're using this option, you probably want to set it all the time for a given repo.

Signed-off-by: Luke Diamand <luke@diamand.org>
---
 Documentation/git-p4.txt | 5 ++++-
 git-p4.py                | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index e8452528fc..3d83842e47 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -367,7 +367,7 @@ These options can be used to modify 'git p4 submit' behavior.
 
 --disable-rebase::
     Disable the automatic rebase after all commits have been successfully
-    submitted.
+    submitted. Can also be set with git-p4.disableRebase.
 
 Rebase options
 ~~~~~~~~~~~~~~
@@ -690,6 +690,9 @@ git-p4.conflict::
 	Specify submit behavior when a conflict with p4 is found, as per
 	--conflict.  The default behavior is 'ask'.
 
+git-p4.disableRebase::
+    Do not rebase the tree against p4/master following a submit.
+
 IMPLEMENTATION DETAILS
 ----------------------
 * Changesets from p4 are imported using Git fast-import.
diff --git a/git-p4.py b/git-p4.py
index c4581d20a6..5ab9421af8 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1379,7 +1379,7 @@ def __init__(self):
         self.shelve = False
         self.update_shelve = list()
         self.commit = ""
-        self.disable_rebase = False
+        self.disable_rebase = gitConfigBool("git-p4.disableRebase")
         self.prepare_p4_only = False
         self.conflict_behavior = None
         self.isWindows = (platform.system() == "Windows")
-- 
2.17.0.392.gdeb1a6e9b7
Previous: Luke DiamandNext: Luke Diamand
Message 2 of 13 in “[PATCHv2 0/6] git-p4: some small fixes updated”
  1. Luke DiamandJun 8, 2018
  2. 1/6 git-p4: disable-rebase: allow setting this via configurationLuke Diamand, Jun 8, 2018
  3. 2/6 git-p4: add option to disable syncing of p4/master with p4Luke Diamand, Jun 8, 2018
  4. 3/6 git-p4: better error reporting when p4 failsLuke Diamand, Jun 8, 2018
  5. 4/6 git-p4: raise exceptions from p4CmdList based on error from p4 serverLuke Diamand, Jun 8, 2018
  6. 5/6 git-p4: narrow the scope of exceptions caught when parsing an intLuke Diamand, Jun 8, 2018
  7. 6/6 git-p4: auto-size the blockLuke Diamand, Jun 8, 2018
  8. Junio C HamanoJun 12, 2018
  9. Luke DiamandJun 12, 2018
  10. Junio C HamanoJun 12, 2018
  11. Luke DiamandJun 12, 2018
  12. Eric SunshineJun 12, 2018
  13. Luke DiamandJun 12, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.