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
Cleanup of matrix_gfpn_dense #23400
Comments
Author: Simon King |
Commit: |
comment:2
I suppose it is not needed to add a merge with the one commit from #23352 that is not already included in the branch from here. New commits:
|
comment:3
I really really really hate git's merging incapabilities. |
Work Issues: rebase on top of #23399 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:5
Since git wasn't able to merge the commit "Fix ticket number in deprecation warning", that merely replaces one number by another number in a single line, without touching anything else, I had to manually merge and subsequently rebase the branch. I don't know if it is just me. Is there really no way to avoid dull manual work when all what I want to achieve is having a simple change in a single line? |
Changed work issues from rebase on top of #23399 to none |
comment:7
Replying to @simon-king-jena:
It sounds like you have two branches that have the "equivalent" commits but are based off two different branches. So they are not the same commits and git then has to deal with these conflicts. If the one particular commit with the change is what you wanted and are having these troubles, then you might want to cherry-pick the commit in. Don't forget to also do |
comment:8
Replying to @tscrim:
No, this is not what my problem came from. And I did cherry-pick. See example below.
I did. Just for testing git, I created the following toy example:
Now I am on branch B, and I want to apply the changeset from xyz. This could be tried by either "git merge A" or by "git cherry-pick xyz"; it turns out that the resulting problem is the same. Of course the changeset from xyz cannot be applied, as the changeset's context contains one line with the lower-case letter i, but is being applied to a file where there is an upper-case letter I. So, of course, there is a conflict. Therefore, after "git merge" resp. "git cherry-pick", we do "git mergetool". Result: meld opens with three versions of my_file. The left column is from branch B (vowels are upper-case, j is lower case). The middle column, which will eventually contain the result of the merge, is the common ancestor of A and B (all letters are lower-case). The right column is from branch A (only J is upper-case, the rest is lower-case). Consequently, in order to merge, I need to manually change all vowels in the middle column to upper-case, and also change j to upper-case. In other words, I need to manually apply all changes. And I really wonder why git makes me do 6 changes (5 vowels plus j), when 4 of these changes (namely the vowels a,e,o,u) are outside of the changeset. To me, it seems obvious that in the middle column we should start with B (perhaps even after applying the hunks from the changeset that cleanly apply), because that's what we want to apply the changeset to. And then, we can solve the problem by focusing on the changeset: Change i into I and j into J. Done. So, what is git's rationale for not doing the obvious? How to do better? |
comment:9
This is not git but the mergetool (which one are you using?). If you look at the actual file manually, you should see
(where Now my default mergetool |
comment:10
Replying to @tscrim:
I see. For me, it is
because I have this in my .gitconfig:
When I remove the conflictstyle option, I get the same as you.
Part of the problem may be this: I tried to replace meld with kdiff3. However, if I have this in .gitconfig
and do "git mergetool", then simply kdiff3 doesn't open. Do you know why? |
comment:11
Aha! I found why kdiff3 didn't open: It silently did the job! See here So, with the other configuration, "git mergetool" triggered kdiff3 to resolve the conflict automatically and save the result. So, I didn't need any manual intervention at all! I will change to kdiff3, then... |
comment:12
Argh. After kdiff3's successful automatic merge, I did "git commit". To be on the safe side, I wanted to repeat the test. So, I did "git reset --hard HEAD~". Then, the following happened when retrying:
These are conflicting messages: It says the it resolved the problem using previous resolution, but also stated that the automatic merge failed. Therefore, I had a look at my_file, which looked fine: The conflict was correctly resolved. However, "git log" showed that the commit from A has in fact not been merged. Therefore, I tried "git commit". Result:
Since there seem to be unresolved conflicts, I did
WTF? There are unresolved conflicts, thus, I cannot commit, but no files need merging? Let's see the status:
Hm. Very very strange (to me, at least). Can you explain what is happening here? |
comment:13
I think what had happened is
|
comment:14
Replying to @tscrim:
Thank you! Yes, that did the trick. OK. In future I will use kdiff3 instead of meld. Would you recommend to add "conflictstyle = diff3" to my .gitconfig, or better not use it? |
comment:15
Replying to @simon-king-jena:
No problem.
I don't use it for my workflow, but I would say it depends on what works best for you. |
Work Issues: refactor a couple of tickets |
Changed dependencies from #23399 to # |
comment:17
I believe #23411, #23352 and #21437 should be stable now (although they still need a review), since the touched code should be clean. Thus, I am rebasing this ticket on top of the aforementioned (unless someone tells me to wait). Furthermore, I think #23399 (with further additions to meataxe) should be based on clean code, i.e., should be based on this ticket. |
comment:18
Oops, #23411 needs work. Anyway, this ticket should be based on the others... |
comment:22
I don't know the policy about dependencies. #23411 is a dependency of #21437 and merges cleanly into #21437; however, the branch from #21437 doesn't contain all of #23411. Should it? In any case, I believe the branch here should contain #23411. So, I'll start on top of #21437 with #23411 merged. |
comment:23
IMO, it is easier for the reviewer to have all of the dependencies merged in. Although it does make it harder for looking at the diff. We do not have any concrete policy on the IIRC. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:25
The refactoring of meataxe tickets is now almost accomplished: Only #23399 (for the addition of new functionality) is left. |
comment:26
Replying to @tscrim:
Thank you. Here, I got a merge conflict (with #23352, not with #23411), and thus an explicit merge commit was needed anyway. |
Changed branch from u/SimonKing/cleanup_of_matrix_gfpn_dense to public/optional/cleanup_matrix_gfpn_dense-23400 |
comment:27
LGTM. I did a trivial rebase, so I'm allowing myself to set a positive review. New commits:
|
Changed work issues from refactor a couple of tickets to none |
Reviewer: Travis Scrimshaw |
Changed branch from public/optional/cleanup_matrix_gfpn_dense-23400 to |
Ticket #21437 is supposed to be split into smaller chunks, and this is one of them: Make the code Python 3 compliant, use sig_on/sig_check/sig_off with more care, use the
for i in range(bla)
instead offor i from 0<=i<bla
.Depends on #21437
Depends on #23411
Component: packages: optional
Author: Simon King
Branch/Commit:
c0fd902
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/23400
The text was updated successfully, but these errors were encountered: