From 985d63aa7bac26c6f03934b660d742c0d41c996d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= Date: Fri, 19 Feb 2016 18:27:11 +0000 Subject: git-p4.py: Don't try to rebase on submit from bare repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Luke Diamand Signed-off-by: Junio C Hamano --- git-p4.py | 5 +++-- 1 file 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: -- cgit v1.2.1