6 ms·
Jujutsu equivalents, if anyone is curious: What Changes the Most jj log --no-graph -r 'ancestors(trunk()) & committer_date(after:"1 year ago")' \ -T
by pzmarzly 6mo ago
Jujutsu equivalents, if anyone is curious:
What Changes the Most
jj log --no-graph -r 'ancestors(trunk()) & committer_date(after:"1 year ago")' \
-T 'self.diff().files().map(|f| f.path() ++ "\n").join("")' \
| sort | uniq -c | sort -nr | head -20
Who Built This
jj log --no-graph -r 'ancestors(trunk()) & ~merges()' \
-T 'self.author().name() ++ "\n"' \
| sort | uniq -c | sort -nr
Where Do Bugs Cluster
jj log --no-graph -r 'ancestors(trunk()) & description(regex:"(?i)fix|bug|broken")' \
-T 'self.diff().files().map(|f| f.path() ++ "\n").join("")' \
| sort | uniq -c | sort -nr | head -20
Is This Project Accelerating or Dying
jj log --no-graph -r 'ancestors(trunk())' \
-T 'self.committer().timestamp().format("%Y-%m") ++ "\n"' \
| sort | uniq -c
How Often Is the Team Firefighting
jj log --no-graph \
-r 'ancestors(trunk()) & committer_date(after:"1 year ago") & description(regex:"(?i)revert|hotfix|emergency|rollback")'
Much more verbose, closer to programming than shell scripting. But less flags to remember.
- faangguyindia 6mo agoI can't remember all of this, does anyone know of any LLM model trained on CLI which can be run locally?
- lamasery 6mo agoIf you copy those commands into a file and use that file to prompt the “sh” LLM.
- stingraycharles 6mo agoThat works until you need a small variation of any of these commands and you’re lost.
- esafak 6mo agoNot a model, but a product: warp.dev
- fainpul 6mo agoTry https://cheat.sh/ https://cheat.sh/
- palata 6mo agoTo me, it makes jujutsu look like the Nix of VCSes. Not meaning to offend anyone: Nix is cool, but adds complexity. And as a disclaimer: I used jujutsu for a few months and went back to git. Mostly because git is wired in my fingers, and git is everywhere. Those examples of what jujutsu can do and not git sound nice, but in those few months I never remotely had a need for them, so it felt overkill for me.
- Jenk 6mo agoTbf you wouldn't use/switch to jj for (because of) those kind of commands, and are quite the outlier in the grand list of reasons to use jj. However the option to use the revset language in that manner is a high-ranking reason to use jj in my opinion. The most frequent "complex" command I use is to find commits in my name that are unsigned, and then sign them (this is owing to my workflow with agents that commit on my behalf but I'm not going to give agents my private key!) jj log -r 'mine() & ~signed()' # or if yolo mode... jj sign -r 'mine() & ~signed()' I hadn't even spared a moment to consider the git equivalent but I would humbly expect it to be quite obtuse.
- palata 6mo agoActually, signing was one of the annoying parts of jujutsu for me: I sign with a security key, and the way jujutsu handled signing was very painful to me (I know it can be configured and I tried a few different ways, but it felt inherent to how jujutsu handles commits (revisions?)).
- arccy 6mo agoThe only reasonable way to use signing in jj is with the sign-on-push config https://docs.jj-vcs.dev/latest/config/#automatically-signing-commits https://docs.jj-vcs.dev/latest/config/#automatically-signing... rather than as commits are made
- Zambyte 6mo agoWhy? I have my signing behavior set to own and I haven't noticed any issues, but I don't actually rely on signatures for much.
- gib444 6mo agoHah someone really looked at jq (?) and thought: "yes, more of this everywhere". I feel jq is like marmite (edit: aka vegemite, i.e. "you either love it or you hate it")
- maleldil 6mo agoIt's really not that bad, although the jq comparison might be apt. You have such primitives you need to understand, and then everything just fits together nicely. I find this much easier to write and understand than git's cryptic format strings. Disclaimer: I love jq too :)
- plandis 6mo agoIt doesn't seem any more egregious than something like: `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --` Which is something I see a lot of people alias in Git for viewing logs.
- skydhash 6mo ago> `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --` If you remove the rainbow specification, it should be git log --graph --pretty=format:'%h -%d %s (%cr) <%an>' --abbrev-commit -- And most programmers are used to C style formatting.
- stingraycharles 6mo agoI don’t understand how people can remember all these custom scripting languages. I can’t even remember most git flags, I’m ecstatic when I remember how to iterate over arrays in “jq”, I can’t fathom how people remember these types of syntaxes.
- mgfist 6mo agoSame, but now with AI I don't have to remember that anymore
- awesome_dude 6mo agoFor now - the law of enshittification means that the free/cheap access to AI will be curtailed soon enough.
- mgfist 6mo agoPretty much any OS locally runnable LLM can generate this stuff.
- Cthulhu_ 6mo agoI don't, I will google things and fiddle, then put it in a git alias (with a comment on what it does and / or where I got it from) and push it to my private dotfiles repo, taking it with me between computers and projects.
- crispyambulance 6mo agoI am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage. At this point perhaps a million person-years have been sacrificed to the semantically incoherent shit UX of git. I have loathed git from the beginning but there's effectively no other choice. That said, the OP's commands are useful, I am copying them (because obviously I won't ever memorize them).
- 6mo ago
- huflungdung 6mo ago[dead]
- socalgal2 6mo agoa project isn’t dying because of no commits. Rather it’s stable I often feel I need to setup bots to make superfluous commits just to make it look like my useful and stable repos are “active” One example (not mine) a a qr-code generator library. Hasn’t been updated in 10 years. It’s perfect as is. It just provides the size and the bits. You convert those bits to any representation you want. It has no need to be updated
- wredcoll 6mo agoIt's rare, I think, for a project to have such a well defined and singular purpose that has not changed in 10 years nor have any bugs been discovered or its dependencies changed underneath it. It's not impossible, of course, but if I saw even a qr library that hadn't changed in 10 years I would worry that it wouldn't build on current systems (due to dependencies) and that nobody was actually using it (due to lag of bug reports).
- latexr 6mo agoI have several of those projects. I avoid dependencies as much as possible, striving to only use things which I know ship with my target OS. I code for a level of correctness and longevity. That benefits everyone, including myself. A QR (or barcode) library is exactly the type of thing I’d assume would still work fine, since there’s nothing new to do, the parsing rules don’t change, it’s a static, known, solved problem.
- robinsonb5 6mo ago> A QR (or barcode) library is exactly the type of thing I’d assume would still work fine, since there’s nothing new to do, the parsing rules don’t change, it’s a static, known, solved problem. I agree with you - and yet the barcode library I used recently for a variable-data-printing project was last updated 13 hours ago, despite having been around since 2008!
- xp84 6mo agoWell said. Even an awesome library with no bugs that has no external dependencies still depends on the stdlib. For a while, before we were using containers, we even had the issue on Mac dev machines especially, where a half dozen Rubygems would crash while building its C extensions if your Mac OS version wasn’t just what the author expected, due to changes in the compiler shipped by Apple. So a MacOS major update might on its own functionally break a gem, even if the gem itself was designed well and you were using the same Ruby version.
- newsoftheday 6mo agoI don't want to program git, I want to get stuff done so I would reject using that tool and do what the article author did running tried and true pipeable Linux/UNIX commands. It's also the same reason why I dislike Gradle and use Maven, I don't want to program my build I want to define and run my build.
- nine_k 6mo agoBut the git commands in the article is also programming of the same kind, just using more terse, more obscure language. All the shell pipelines are sort, uniq, and grep. A language that properly maps to the data model, and has readable identifiers is a boon. Git is a database, a database needs a proper query language.
- dcre 6mo agoSaw all the replies crying over how verbose these are, clicked through to TFA expecting to see simpler commands. Nope, they're basically the same thing, just slightly shorter. I would never memorize either the jj or git versions if I planned to use them regularly; I'd make aliases.
- WolfeReader 6mo agoThis is the only sane reply on this entire comment tree. To me, the verbosity of both Git and JJ commands to do these things are an indication that neither of these tools are meant to do them.
- AlexeyBelov 6mo agocrying over? Let's not be confrontational. I could say you're "crying" with this comment, but is that a good thing to say?
- dcre 6mo agoCome on.
- cynicalsecurity 6mo agoNot interested, thank you.
- NamlchakKhandro 6mo agoDidn't ask for it thanks
- okkdev 6mo agoCool! Thanks :) Jujutsu is such a nice tool. I don't understand why everything has to be so divisive nowadays. Enjoy the tools you like.