Replies: 4 comments 4 replies
-
I had a similar question and just found https://github.com/hymkor/jjtagdesc. It doesn't look like it works anymore probably due to output changes in |
Beta Was this translation helpful? Give feedback.
-
This is awesome. Thanks for sharing. I converted to a Fish shell function which is working well: # https://github.com/jj-vcs/jj/discussions/2563
function jj_describe --description 'replicate git describe --tags for jj'
set count 0
set tag ""
set latest_commit ""
set jj_output (jj log -r 'latest(tags())::@- ~ empty()' --no-graph --reversed -T 'commit_id.short(10) ++ " " ++ tags ++ "\n"')
for line in $jj_output
set count (math $count + 1)
set -l parts (string split " " $line)
set latest_commit $parts[1]
if test (count $parts) -gt 1; and test -z "$tag"
set tag (string sub --start 2 $parts[2])
end
end
printf "%s-%d-%s\n" $tag $count $latest_commit
end |
Beta Was this translation helpful? Give feedback.
-
I have a program that helps me implement common operations across repositories, across both Matching
I don't see a way to do this with And that's all not even mentioning other flags for Footnotes
|
Beta Was this translation helpful? Give feedback.
-
I know this is lame, but given the original motivation
this worked for me as a very quick hack both for colocated and non-colocated repos:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I really like using
git describe --tags
as an easy way to generate a version string. It has the following advantages:HEAD
is on a commit corresponding to a release tag, you get that release versionIs there anything like this in
jj
? For collocated reposgit describe --tags
works, but I think it would be good to have a native command that behaves similarly.Beta Was this translation helpful? Give feedback.
All reactions