-
Notifications
You must be signed in to change notification settings - Fork 319
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
FR: jj blame
/jj point-finger
a blame layer.
#2988
Comments
No, that's actually a great point. If we want to support difftastic-like diffs, having them available in |
FYI: Pijul chose to call it |
Reminds me of this song: https://youtu.be/UQHaGhC7C2E?si=n20KACC6SZmK480N&t=235 It's not the best Tom Lehrer song, but it might be worth a snicker depending on the mood. Ideally, |
I'm totally onboard with calling it |
It would be funny if we called it |
I have often said " |
So not familiar with A problem I have with git is it shows too much metadata by default, making it harder to browse
In As I use a merge-commit workflow on multi-commit PRs, I find having the code only annotate for the merge-commit is both more informative (giving me the context of the logical series its attached to and a quick reference for the PR to open it to see the review) and speeds things up. I also syntax highlight the code using What I would like to add is a TUI that let's you move back and forth through history, pop up a log viewer for the commit of the currently selected hunk, move into the merge-commits, etc. As mentioned, I'm just now kicking the tires on jj but if it works out, I'll set aside time to help get this implemented. |
Yes, that's the goal of having a abstract interface for the UI of
If you can write a blame layer for your use-case, I'd be happy to accept it.
We already ship a TUI, so if you miss functionality please move the work upstream (scm-diff-editor). |
that link gives a 404, is the repo private? |
Should be good now, I used the name of the binary instead of the repo, which is |
@epage 's comment of two other TUIs for For tig, I feel that it has a lot of good functionality, but the key bindings for blame are confusing. Update: I just tried using |
My big problem with full-featured git TUIs is that I had a hard time figuring out how to navigate it. I didn't want to learn a whole other tool just to accomplish one job that it might do well. This was one of the ideas for And yes, discoverable key bindings are a must. |
Another thing I view as a "git failing" is that git supports files to ignore revs for blame but there isn't a well-known name for this that git auto-picks up. There is a config setting for the file but git doesn't support a committed config file. I'd propose either
|
I think your wrong here, as you can see both llvm and chromium check-in their
Both options are good a solution. Ideally, we should just read a file that contains either revisions or a revset. |
You've observed a convention but that doesn't mean the convention is natively supported by git. I just re-confirmed by checking |
I think you need to set a config to use the file. This is, of course, not ideal. https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
OTOH, you could add these tips to I know three tools now I'd recommend for blame: |
Interaction is on the roadmap but I might just instead help out with Similarly, adopting the convention by auto-detecting the file is on the roadmap. |
I'm sorry, it was only meant for the "There is a config setting for the file but git doesn't support a committed config file." part of your statement, as it is checked-in. It is sad though that is not a convention. |
That is referring to |
Another interesting tidbit: GitHub supports this convention. But not GitLab, according to https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html. |
For the name, I still like To throw out a few options out there, if we want a neutral tone, I like |
imo the value of My concern with any name that tries to do a positive spin on This is why I went with the name Some phrases that could help inspire a name include
|
Interesting point. I think blaming or crediting a commit might make sense. Certainly, this makes sense for blame: "I blame the weather" makes as much sense as (or more than :) ) "I blame the weatherman!". I was thinking "attribute the line to a commit", "trace which commit this line comes from", "which commit is each line associated with?". The first of these is how I would explain to a person what the command does, but it's annoying that "attribute" is a noun that could make somebody think of setting an attribute. |
@ilyagr any thoughts on whether I agree with the following rule, but About naming, I think |
I'm not really sure, but it's an interesting question. As you point out, this contradicts the rule I invented in the comment you linked, but it does feel very natural in other ways. Should the rule be modified, perhaps? I also wonder about discoverability: would we want a top-level alias if the command is under "file"? Would people find it regardless? |
If the command supports a template to render the information being added to each line, something generic like |
Should be implemented by 470275b, closing. |
Is your feature request related to a problem? Please describe.
Jujutsu currently lacks a blame layer which determines who was responsible for which line of code. This is commonly called a blame layer.
Describe the solution you'd like
Add a
jj blame
command and a trait as integration point for large repos, as it may be very expensive to calculate each line for a file which was changed many times.Additional context
Maybe choosing a approach like Sapling could be useful, as it has support to blame different types of things like commit metadata, the whole file or a incomplete file.
The text was updated successfully, but these errors were encountered: