-
-
Notifications
You must be signed in to change notification settings - Fork 264
feat: jujustu support #930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #930 +/- ##
==========================================
+ Coverage 42.91% 43.14% +0.23%
==========================================
Files 21 21
Lines 1713 1718 +5
==========================================
+ Hits 735 741 +6
+ Misses 978 977 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
orhun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good starting point, thanks :)
If the .git directory can't be opened (usually because the `.git` directory is missing) it attempts to find the git repository in the location used by Jujutsu (i.e. `.jj/repo/store/git`). If the Jujutsu git directory doesn't exist, then the origin error is propogated. CODE test: add unit tests for opening jujutsu repo Update git-cliff-core/src/repo.rs Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com> Update git-cliff-core/src/repo.rs Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com> Update git-cliff-core/src/repo.rs Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com> Update git-cliff-core/src/repo.rs Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
orhun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
Description
Adds support for opening the Git repository used when a repository is cloned using Jujutsu and the
--colocateoption was NOT used.Note: this requires that the user updates the
HEADof the git repository to point to their mainline branch, as the Git repository the Jujutsu creates isn't 100% configured.If the .git directory can't be opened (usually because the
.gitdirectory is missing) it attempts to find the git repository in the location used by Jujutsu (i.e..jj/repo/store/git). If the Jujutsu git directory doesn't exist, then the origin error is propogated.Motivation and Context
Jujutsu is a Version Control System that uses Git as it's local store, and can work as an effective replacement for Git on a Developer's workstation.
When a Git repository is cloned by Jujutsu, the default location for the Git respository files is
.jj/repo/store/git, rather than the usual.git.git-cliffexpectes the.gitlocation. This PR teachesgit-cliffto also check the.jj/repo/store/gitlocation.Closes #875
How Has This Been Tested?
Test with Jujutsu repository:
jj git clone git@git.kemitix.net:kemitix/git-next.git && cd git-nextmainbranch:echo 'ref: refs/remotes/origin/maingit-cliff:../git-cliff/target/debug/git-cliffRegression test with a Git repository:
git clone git@git.kemitix.net:kemitix/git-next.git git-next-git && cd git-next-gitgit-cliff:../git-cliff/target/debug/git-cliffScreenshots / Logs (if applicable)
Types of Changes
Checklist: