From: Junio C Hamano Date: Fri, 20 May 2022 22:26:55 +0000 (-0700) Subject: Merge branch 'tk/p4-with-explicity-sync' X-Git-Tag: v2.37.0-rc0~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af3a3205d14561e1683ca86b894888f9f1fc0176;p=thirdparty%2Fgit.git Merge branch 'tk/p4-with-explicity-sync' "git p4" update. * tk/p4-with-explicity-sync: git-p4: support explicit sync of arbitrary existing git-p4 refs --- af3a3205d14561e1683ca86b894888f9f1fc0176 diff --cc git-p4.py index 1d83cdea58,48d5805ee4..3119f5b5fd --- a/git-p4.py +++ b/git-p4.py @@@ -3920,9 -3780,13 +3949,13 @@@ class P4Sync(Command, P4UserMap) # restrict to just this one, disabling detect-branches if branch_arg_given: - short = self.branch.split("/")[-1] + short = shortP4Ref(self.branch, self.importIntoRemotes) if short in branches: - self.p4BranchesInGit = [ short ] + self.p4BranchesInGit = [short] + elif self.branch.startswith('refs/') and \ + branchExists(self.branch) and \ + '[git-p4:' in extractLogMessageFromGitCommit(self.branch): - self.p4BranchesInGit = [ self.branch ] ++ self.p4BranchesInGit = [self.branch] else: self.p4BranchesInGit = branches.keys()