Skip to content

Commit

Permalink
Merge branch 'ps/p4-use-ref-api'
Browse files Browse the repository at this point in the history
"git p4" update to prepare for reftable

* ps/p4-use-ref-api:
  git-p4: stop reaching into the refdb
  • Loading branch information
gitster committed Jan 19, 2024
2 parents 1b09562 + 02b5c1a commit ed87d37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -4251,7 +4251,8 @@ def run(self, args):
if self.tempBranches != []:
for branch in self.tempBranches:
read_pipe(["git", "update-ref", "-d", branch])
os.rmdir(os.path.join(os.environ.get("GIT_DIR", ".git"), self.tempBranchLocation))
if len(read_pipe(["git", "for-each-ref", self.tempBranchLocation])) > 0:
die("There are unexpected temporary branches")

# Create a symbolic ref p4/HEAD pointing to p4/<branch> to allow
# a convenient shortcut refname "p4".
Expand Down

0 comments on commit ed87d37

Please sign in to comment.