Re: [PATCHv1 2/2] git-p4: work with a detached head

2015-10-28 Thread Luke Diamand
On 28/10/15 17:44, Junio C Hamano wrote: Luke Diamand writes: On 9 September 2015 at 22:52, Junio C Hamano wrote: Luke Diamand writes: ... def currentGitBranch(): return read_pipe("git name-rev HEAD").split("

Re: [PATCHv1 2/2] git-p4: work with a detached head

2015-09-10 Thread Luke Diamand
On 9 September 2015 at 22:52, Junio C Hamano wrote: > Luke Diamand writes: > >> def run(self, args): >> if len(args) == 0: >> self.master = currentGitBranch() >> -if len(self.master) == 0 or not

Re: [PATCHv1 2/2] git-p4: work with a detached head

2015-09-10 Thread Junio C Hamano
Luke Diamand writes: > On 9 September 2015 at 22:52, Junio C Hamano wrote: >> Luke Diamand writes: >> >>> def run(self, args): >>> if len(args) == 0: >>> self.master = currentGitBranch() >>> -if

Re: [PATCHv1 2/2] git-p4: work with a detached head

2015-09-09 Thread Junio C Hamano
Luke Diamand writes: > def run(self, args): > if len(args) == 0: > self.master = currentGitBranch() > -if len(self.master) == 0 or not gitBranchExists("refs/heads/%s" > % self.master): > -die("Detecting current git branch

[PATCHv1 2/2] git-p4: work with a detached head

2015-09-05 Thread Luke Diamand
When submitting, git-p4 finds the current branch in order to know if it is allowed to submit (configuration "git-p4.allowSubmit"). On a detached head, detecting the branch would fail, and git-p4 would report a cryptic error. This change teaches git-p4 to recognise a detached head and submit