Re: [PATCH] git-p4.py: Don't try to rebase on submit from bare repository
On Fri, Feb 19, 2016 at 1:27 PM, Amadeusz Żołnowski wrote: > 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. As a person who does not use Perforce, it is not obvious to me from the commit message why this change is beneficial or even what the consequences are. Will Perforce users understand this change given only the explanation above? If not, perhaps it would be helpful to expand the commit message to explain more thoroughly the impact of this change and why it is a good idea. Thanks. > Signed-off-by: Amadeusz Żołnowski > --- > git-p4.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/git-p4.py b/git-p4.py > index c33dece..e00cd02 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: > -- > 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-p4.py: Don't try to rebase on submit from bare repository
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 --- git-p4.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-p4.py b/git-p4.py index c33dece..e00cd02 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: -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-p4.py: Don't try to rebase on submit from bare repository
Luke Diamand writes: > On 17 February 2016 at 22:46, Amadeusz Żołnowski wrote: >> 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. > > This looks obviously sensible and good to me, ack. > > Thanks! > Luke Luke, thanks for a prompt feedback. Amadeusz, can you sign off your patch (cf. Documentation/SubmittingPatches)? > > > >> --- >> git-p4.py | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/git-p4.py b/git-p4.py >> index c33dece..e00cd02 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: >> -- >> 2.7.0 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe git" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-p4.py: Don't try to rebase on submit from bare repository
On 17 February 2016 at 22:46, Amadeusz Żołnowski wrote: > 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. This looks obviously sensible and good to me, ack. Thanks! Luke > --- > git-p4.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/git-p4.py b/git-p4.py > index c33dece..e00cd02 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: > -- > 2.7.0 > > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-p4.py: Don't try to rebase on submit from bare repository
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. --- git-p4.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-p4.py b/git-p4.py index c33dece..e00cd02 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: -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html