Re: git help: fortran_unsigned branch
On Fri, Aug 09, 2024 at 08:00:42PM +0200, Thomas Koenig via Gcc wrote: > Hi, > > I have managed to bring the fortran-unsigned branch into a state where > it can no longer be rebased. When I do a > > $ git rebase master It's unknown what is the state of your local master branch. So I would advise to rebase against master branch on the server: $ git fetch origin $ git rebase origin/master With the above I get the following result, which looks reasonably ok to me: $ git log --oneline --decorate 7bc60bc184f (HEAD) Add merge_bits. ae4b29f34c9 Min, MAX and ishft(c). e7a3c1f7841 Add test case for B, Z and O descriptors. 61b3f21a44b Add some rudimentary documentation. 4589ae45088 Implement dshift[lr], ibclr, ibset and ibits. d1cf578cb2a Add bit_size, btest and bgt plus friends. b285c13323b Bit functions, HUGE and DIGITS. c39c316ae8b Added BOZ support to UINT. 95927079ebc Added UINT intrinsic. 70a309048fe Iplement conversions from unsigned to different data types. c1e596f32f8 Add decimal formatted I/O for unsigneds. 65c571ffe65 A few fixes, add unsigned truncation warning. b84ec7f0242 Implement decimal list-directed I/O. f63906c5ff0 Add compile-time version of selected_unsigned_kind. c8e2ea0c39d Got some basic arithmetic working, test case now run-time. dd626ce9863 Very first program compiles. 1f93f691ff2 Initial version - add do-nothing -funsigned option and BT_UNSIGNED. d0bc1cbf6a8 (origin/trunk, origin/master, origin/HEAD) btf: Protect BTF_KIND_INFO against invalid kind > > I get > ... > > warning: skipped previously applied commit a6399bb27b3 > hint: use --reapply-cherry-picks to include skipped commits > hint: Disable this message with "git config advice.skippedCherryPicks false" Your origin/devel/fortran_unsigned has manually cherry-picked patches, which meanwhile got merged in "origin/master". I suspect those cherry-picked patches got sneaked in when a stale base was used for a git rebase (i.e. your local master branch). Warnings seem benign to me, but I would use the "gitk" tool to check the rebased branch. Just in case. > Successfully rebased and updated refs/heads/fortran_unsigned. > > and > > $ git status > On branch fortran_unsigned > Your branch and 'origin/devel/fortran_unsigned' have diverged, > and have 688 and 198 different commits each, respectively. > (use "git pull" to merge the remote branch into yours) > > nothing to commit, working tree clean > > and when I do "git pull" I get a lot of conflicts, basically having > to redo each commit by hand, as a conflict. If your local branch is tracking origin/devel/fortran_unsigned, then you are attempting to merge pre-rebase history with post-rebase history. In such case conflicts are expected. Don't pull the remote devel branch. To visualise the histories of your local and the remote branch: $ gitk -n1 HEAD origin/devel/fortran_unsigned Regards, Dimitar > > I have no idea what happened, or why, and despite the help of some > nice people on #gcc I have not made any progress on how to resolve it. > > Does anybody have any idea how to fix this? > > If not, I will just have to abandon the devel branch and work locally. > Not that I want to, but I guess it's better than not doing anything... > > Best regards > > Thomas
Re: git help: fortran_unsigned branch
On Fri, Aug 09, 2024 at 08:43:38PM +0200, Thomas Koenig wrote: > Hi Dimitar, > > > On Fri, Aug 09, 2024 at 08:00:42PM +0200, Thomas Koenig via Gcc wrote: > > > Hi, > > > > > > I have managed to bring the fortran-unsigned branch into a state where > > > it can no longer be rebased. When I do a > > > > > > $ git rebase master > > It's unknown what is the state of your local master branch. So I would > > advise to rebase against master branch on the server: > > > > $ git fetch origin > > $ git rebase origin/master > > OK, I did that. > > > With the above I get the following result, which looks reasonably ok to > > me: > > > > $ git log --oneline --decorate > > 7bc60bc184f (HEAD) Add merge_bits. > > ae4b29f34c9 Min, MAX and ishft(c). > > e7a3c1f7841 Add test case for B, Z and O descriptors. > > 61b3f21a44b Add some rudimentary documentation. > > 4589ae45088 Implement dshift[lr], ibclr, ibset and ibits. > > d1cf578cb2a Add bit_size, btest and bgt plus friends. > > b285c13323b Bit functions, HUGE and DIGITS. > > c39c316ae8b Added BOZ support to UINT. > > 95927079ebc Added UINT intrinsic. > > 70a309048fe Iplement conversions from unsigned to different data types. > > c1e596f32f8 Add decimal formatted I/O for unsigneds. > > 65c571ffe65 A few fixes, add unsigned truncation warning. > > b84ec7f0242 Implement decimal list-directed I/O. > > f63906c5ff0 Add compile-time version of selected_unsigned_kind. > > c8e2ea0c39d Got some basic arithmetic working, test case now run-time. > > dd626ce9863 Very first program compiles. > > 1f93f691ff2 Initial version - add do-nothing -funsigned option and > > BT_UNSIGNED. > > d0bc1cbf6a8 (origin/trunk, origin/master, origin/HEAD) btf: Protect > > BTF_KIND_INFO against invalid kind > > I get the same. > > > > > > > > > I get > > > ... > > > > > > warning: skipped previously applied commit a6399bb27b3 > > > hint: use --reapply-cherry-picks to include skipped commits > > > hint: Disable this message with "git config advice.skippedCherryPicks > > > false" > > > > Your origin/devel/fortran_unsigned has manually cherry-picked patches, > > which meanwhile got merged in "origin/master". I suspect those > > cherry-picked patches got sneaked in when a stale base was used for a > > git rebase (i.e. your local master branch). > > That actually sounds like a reasonable explanation of what could have > happened. Of course, it would have been nice to have known that > beforehand, or maybe even a warning from git... > > > Warnings seem benign to me, but I would use the "gitk" tool to check the > > rebased branch. Just in case. > > I've looked at it a bit and seen nothing untoward. > > > > > > Successfully rebased and updated refs/heads/fortran_unsigned. > > > > > > and > > > > > > $ git status > > > On branch fortran_unsigned > > > Your branch and 'origin/devel/fortran_unsigned' have diverged, > > > and have 688 and 198 different commits each, respectively. > > >(use "git pull" to merge the remote branch into yours) > > > > > > nothing to commit, working tree clean > > > > > > and when I do "git pull" I get a lot of conflicts, basically having > > > to redo each commit by hand, as a conflict. > > > > If your local branch is tracking origin/devel/fortran_unsigned, then you > > are attempting to merge pre-rebase history with post-rebase history. > > In such case conflicts are expected. Don't pull the remote devel > > branch. > > Hmm... but I already did. And, following other people's advice, > have reset the branch to upstream already (which may have been > another mistake). > > So, anything I can do about this, or have I messed up the > branch beyond repair? I assume you reset your local branch? The branch on the server does not seem to be affected. I suggest to rebase the remote branch using another local branch. Example: # Just in case, see which is your old local branch. $ git branch # Create a new local tracking branch $ git checkout -b fortran_unsigned-20240809 origin/devel/fortran_unsigned $ git rebase origin/master $ gitk -n1000 Once you have verified that local history looks good, you can upload it to the server. Notice that you override the history, which is a natural consequence of the rebase. $ git push --force origin HEAD:refs/heads/devel/fortran_unsigned Regards, Dimitar > > > > To visualise the histories of your local and the remote branch: > >$ gitk -n1 HEAD origin/devel/fortran_unsigned > > Looks like a nice tool. > > Best regards > > Thomas
Re: git help: fortran_unsigned branch
On Fri, Aug 09, 2024 at 09:40:08PM +0200, Thomas Koenig wrote: > Am 09.08.24 um 21:17 schrieb Dimitar Dimitrov: > > > I assume you reset your local branch? The branch on the server does not > > seem to be affected. I suggest to rebase the remote branch using > > another local branch. Example: > > > ># Just in case, see which is your old local branch. > >$ git branch > > > ># Create a new local tracking branch > >$ git checkout -b fortran_unsigned-20240809 origin/devel/fortran_unsigned > >$ git rebase origin/master > >$ gitk -n1000 > > > > I tried that, with te same result: > > warning: skipped previously applied commit a6399bb27b3 > hint: use --reapply-cherry-picks to include skipped commits > hint: Disable this message with "git config advice.skippedCherryPicks false" > Successfully rebased and updated refs/heads/fortran_unsigned-20240809. > > $ git status > On branch fortran_unsigned-20240809 > Your branch and 'origin/devel/fortran_unsigned' have diverged, > and have 690 and 198 different commits each, respectively. > (use "git pull" to merge the remote branch into yours) You are redoing the rebase again. So it is expected to get the same warnings. > > So, it seems I already pushed something dubious previously. Yes, that seems to be the case. > > Any other ideas? No, sorry. I thought that getting to a cleanly rebased tree would be sufficient. > > > > Once you have verified that local history looks good, you can upload it > > to the server. Notice that you override the history, which is a natural > > consequence of the rebase. > >$ git push --force origin HEAD:refs/heads/devel/fortran_unsigned > > Not so long ago, I pushed to that branch, which led to a looong time > for checking. It got there eventually, but I do not want to repeat > that (and with more than ~40 times the number of commits, too). Is "checking" referring to regression testing of the development branch? Regards, Dimitar > > Best regards > > Thomas >