Skip to content

Add support for Jujutsu (when using git store) #875

@kemitix

Description

@kemitix

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

Jujutsu is a version control system very similar to Git. It currently uses Git as it's local store. It can work with Git in one of two ways. One is 'co-located', where the .git repo is in it's normal location. The other stores the .git/ files in .jj/repo/store/git/. This second is the default when the user clones a Git repo without explicitly requesting that is be co-located.

I would like to be able to use git-cliff with a repo that I have checked out locally using the default non-co-located configuration.

Desired solution

Detecting the alternate location of the .git/ files should be straight forward. When the .git/ directory is not found, simply retry using the .jj/repo/store/git/ directory instead.

Jujutsu is branchless, so there may not be any local branches. There will still be references to the remote branches, e.g. origin/main, etc. e.g. .jj/repo/store/git/refs/remotes/origin/main.

So, when using the Jujutsu location for the git repo, using the remote branches rather than local ones may be required. (It is possible to have local branches, but this is up to the users discretion/workflow).

Alternatives considered

Only clone repos with Jujutsu using the co-located option. This is an easy solution with no real downside other than the need to remember to pass the required parameter when cloning.

Additional context

I recognise that git-cliff is aimed at Git compatibility (it's right there in the name!). Jujutsu uses the same on-disk store, so support shouldn't be too difficult to implement. (Then again there's the other 80% of the problem I can't see).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions