-
Notifications
You must be signed in to change notification settings - Fork 69
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
Annotate not working in linux kernel #129
Comments
Additionally, on the terminal I get
(those are 2011 commits) |
@tibirna ? |
I don't have ubuntu around. The time needed for me to install it, you could try to see if git itself (at the command line) is able to do the same annotate you try in qgit. Please report back with the finding. Also, please specify here where in the kernel git history you are positioned and which file do you try to annotate. |
I makes no difference which file or which location in the history. Also I found in other repo's (but not all) the same problem. Which git command would you like me to try exactly? |
Identify the sha of the currently selected commit in your qgit that fails to annotate. Identify the file on which you try to do Ctrl-A and it fails. Then do, at a console: git blame :<path/filename> And let me know if you get the annotations back or some error. For the record, I can't reproduce the issue you have. I tried about 30 files at random at the top of the current kernel git and all works as expected. A wild guess I have is that you might have corrupted qgit cache. I never encountered this before, but just for testing try to quit your qgit and then remove the file <kernel_repo>/.git/qgit_cache.dat, then open your qgit and try again. |
Again: any file and any sha I tried have the same result. But as an example: On the command line where I started qgit: And git blame tsl2563.c > tsl2563.ann
I had already tried deleting the cache, no effect. Also: Ubuntu 22.04 has the same version of qgit as 22.10. However, git was updated from 2.34.1 to 2.37.2. |
Thanks for the investigation. I have git 2.35 here. So there might be something into the update to git 2.37. I'll check it when I'll find some time (need find that version for my distro). |
OK, I can reproduce the issue with git 2.38. I'll try to debug this. Thanks. |
Good you can reproduce, if there is anything I can do to help let me know. BTW thanks for QGit! It's the only git viewer that really helps to make sense of complicated repo's like linux. Especially because of the annotation of files. |
Have you been able to debug this? |
@htot Sorry for the late answer. No, I didn't advance on that. I need contiguous time to set up a VM with the proper dev tools and the deviating git binary. I plan to look into it in the next 2 weeks. Thanks for your understanding. |
No need to apologize. Just curious. |
I uninstalled |
I have encountered the same issue with git 2.39 (Debian 12 "bookworm"). git 2.30 works. I haven't figured out how everything works yet, but if it's of any help, when I debug, I can see that the parents is wrong. Instead of the actual parents, The output from |
OK, that wasn't the full command. Something has changed with respect to the |
Yeah, Also note that |
The commit that introduces the changed behaviour is git/git@0dec322. I'm not sure that I understand or agree with the explanation in the commit message, but it can be counteracted with Git 2.32 is the version that changed the meaning of |
…6 that disables history simplification when doing separate and remerge style merge diffs Fixes tibirna#129.
Thank you very much, Magnus, for all the hard work! |
Upon further testing it appears that while Can we check for missing diffs and insert empty ones, or whatever is necessary to complete the data structure? |
Thanks for the further investigation.
Yes, I had started looking into the assumption taken in the original
analysis of logs in qgit and then I lacked time. Unfortunately, this will
be the case until at least December.
For who wants to look into the matter, qgit's log parsing is not super
complicated. It all goes on inside git.cpp and it doesn't do any fancy
stuff, just basic string chunking/parsing. It just needs a careful, rested
and patient mind.
Thanks
Cristian
…On Fri, Sep 8, 2023 at 11:14 AM Magnus Holmgren ***@***.***> wrote:
Upon further testing it appears that while --simplify-merges often makes
stuff work, the result is not the same as when running Git 2.35 without it.
I think that any time there's a merge commit that only modifies the file in
question from one side, you still get the "merging annotations of different
length". I assume it's because the log output only includes one log record
in that situation, not one for each parent. Previously those commits were
omitted (which was actually a bit confusing, because it looked like some
changes hadn't been merged even though they had). This situation for
example arises when two lineages introduce the same change and one of them
also introduces other changes (or not?).
Can we check for missing diffs and insert empty ones, or whatever is
necessary to complete the data structure?
—
Reply to this email directly, view it on GitHub
<#129 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJOWDWULY26X7HMMXHXZ63XZMY4LANCNFSM6AAAAAASDYO4DI>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
I think the whole problem is that in |
This means that as long as long as all merge commits affecting a specific file merge some change into the main branch (i.e. there is a difference relative to the first parent, or in the case of a multi-way merge, relative to all parents except the last), you'll be fine. |
I'm not sure what is the actual status of the fix but should this be reopened if this is not fixed? I have a bug report in Debian about this problem and I'd like to know if it's fine to apply the linked PR or if I should wait for a more comprehensive fix. |
You're right. I reopen it, lest I forget about it. |
I just built master df6326c tonight and used it to check the history of a file in linux. To me it appears as if the bug is fixed - or at least good enough to make EDIT I am seeing now it is better but not completely right. When I select a file with ctrl-A I get the list of patches that also modified this file, but the list is polluted with merge commits that did not touch this file. So, thanks guys, I hope to see this fix landing in Debian and Ubuntu! BTW while building with g++ 12.3.0 there are quite a bit of warning and notes. Harmless? |
See my edit above |
Hello @htot Thanks for the testing. As @millnet-maho says, his fix indeed works some of the time, but not all. The log outputs in git proper changed in a complex way that requires more complex adaptations in the qgit parser. It was a design choice long ago to parse the git output. I didn't check, but I would believe the libgit2 was not yet available at that time. The proper work to do is to switch to using libgit2, this is something in my todo, but is a rather consequent investment of time and effort. I never consider warnings harmless. I still use g++ 7 here. I'll get v12 and I'll check, when time allows. Thanks for the heads-up. |
Hmm, getting rid of the merge commits that don't touch the file is exactly what the change should do (by passing --simplify-merges to git). What doesn't work is annotations when there's a merge commit that doesn't merge in any changes. |
Is there anybody working on this issue? |
As I lacked the time, I take it there is nobody for now. Thanks for your understanding. |
That is a pity, I couldn't find any other git viewer with such useful presentation of the history of changes per file. I hope you will be able to find time for this in the near future. Thanks! |
Since Ubuntu 22.10 (kinetic) qgit will not annotate (ctrl-a) files from a linux kernel repo. It does annotate other (smaller?) repo's. The status line says "Sorry, annotation not available for this file".
Kinetic has qgit 2.10 same as Jammy. But with Jammy I never had this issue. Does it depend on underlying git (Kinetic 2.37, Jammy 2.34)?
The text was updated successfully, but these errors were encountered: