summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Żołnowski <aidecoe@aidecoe.name>2016-02-19 18:27:11 +0000
committerJunio C Hamano <gitster@pobox.com>2016-02-19 12:17:25 -0800
commit985d63aa7bac26c6f03934b660d742c0d41c996d (patch)
tree0d399043624a5b85173160d4dbba538ecb8eaa6c
parent8a71d90b7e6bcf88232e34c77560dd3d0b334247 (diff)
downloadgit-az/p4-bare-no-rebase.tar.gz
git-p4.py: Don't try to rebase on submit from bare repositoryaz/p4-bare-no-rebase
git-p4 can be successfully used from bare repository (which acts as a bridge between Perforce repository and pure Git repositories). On submit git-p4 performs unconditional rebase. Do rebase only on non-bare repositories. Signed-off-by: Amadeusz Żołnowski <aidecoe@aidecoe.name> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-p4.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-p4.py b/git-p4.py
index c33dece5d2..e00cd02236 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -2059,8 +2059,9 @@ class P4Submit(Command, P4UserMap):
sync.branch = self.branch
sync.run([])
- rebase = P4Rebase()
- rebase.rebase()
+ if not gitConfigBool("core.bare"):
+ rebase = P4Rebase()
+ rebase.rebase()
else:
if len(applied) == 0: