Skip to content

jj git clone not cloning all tags #4682

@lfrancke

Description

@lfrancke

Description

Note

I initially brought this up on Discord.

I see some tags missing after running a jj git clone.

Steps to Reproduce the Problem

  1. jj git clone git@github.com:apache/druid.git druid-jj-test
  2. jj tag list | wc -l -> results in 456 tags for me today (2024-10-21)
  3. git clone git@github.com:apache/druid.git
  4. git show-ref | grep refs/tags | wc -l shows 502 tags

Expected Behavior

Same number of tags between jj and git.

Actual Behavior

Some tags are missing from jj tag list.

One tag that is missing (as an example) is: refs/tags/druid-30.0.0 with rev 09d36ee324747f1407705c27618b6d415c3fa8a9.

@yuja suggested the following: "Tag refs are fetched if they are ancestors of refs/heads/*."
I have very limited git knowledge beyond the basics (shame on me) so I did some experimenting which might be totally wrong.

❯ git rev-parse druid-30.0.0
09d36ee324747f1407705c27618b6d415c3fa8a9

❯ git rev-parse druid-30.0.1
a30af7a91d528e5c3a90356a5592abc7119191c6

❯ git merge-base --is-ancestor 09d36ee324747f1407705c27618b6d415c3fa8a9 master | complete
╭───────────┬───╮
│ stdout    │   │
│ stderr    │   │
│ exit_code │ 1 │
╰───────────┴───╯

❯ git merge-base --is-ancestor a30af7a91d528e5c3a90356a5592abc7119191c6 master | complete
╭───────────┬───╮
│ stdout    │   │
│ stderr    │   │
│ exit_code │ 1 │
╰───────────┴───╯

According to the merge-base docs:

Check if the first <commit> is an ancestor of the second <commit>, and exit with status 0 if true, or with status 1 if not. Errors are signaled by a non-zero status that is not 1.

Specifications

  • Platform: Linux
  • Version:
❯ jj --version
jj 0.22.0

Metadata

Metadata

Assignees

Labels

🐛bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions