Skip to content

Commit

Permalink
fix: exp list ref heads handling
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein authored and skshetry committed Nov 16, 2022
1 parent 65f61ac commit d52e1aa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dvc/commands/experiments/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ def run(self):
)
tags = self.repo.scm.describe(exps)
remained = {baseline for baseline, tag in tags.items() if tag is None}
base = "refs/heads/"
base = "refs/heads"
ref_heads = self.repo.scm.describe(remained, base=base)

for baseline in exps:
name = (
tags[baseline]
or ref_heads[baseline][len(base) :]
or baseline[:7]
)
name = baseline[:7]
if tags[baseline] or ref_heads[baseline]:
name = tags[baseline] or ref_heads[baseline][len(base) + 1 :]
if not name_only:
print(f"{name}:")
for exp_name in exps[baseline]:
Expand Down

0 comments on commit d52e1aa

Please sign in to comment.