rgleason / LogbookKonni_pi

Logbookkonni_pi for OpenCPN
GNU General Public License v3.0
1 stars 4 forks source link

HTML conflicts from Pull Request? #47

Closed rgleason closed 3 years ago

rgleason commented 3 years ago

After merging your PR to my remote LogbookKonni_pi. Locally, git remote update origin

Receiving objects: 100% (234/234), 62.44 KiB | 6.24 MiB/s, done.
Resolving deltas: 100% (150/150), completed with 39 local objects.
From github.com:rgleason/logbookkonni_pi
   45f7cad..f1b6126  master     -> origin/master

fcgle@Hesper MINGW64 /c/users/fcgle/source/logbookkonni_pi (master)
$ git log --oneline -10
45f7cad (HEAD -> master) leamas cleanup
20b8ab2 (tag: v1.4.20.0) Merge pull request #43 from leamas/clean-up
ef06b7c src: Fix bogus \r at line ends.
dc4666c gitignore: Fix Thumbs.db reference
73b382e src, Layout: renomalize.
d44f600 (tag: v1.4.19.0) 1.4.19.0 + SD 2.8.7.2 + fix macos
c3a4f58 1.4.18.10 Android test
e38129c config.h.in: Add missing package descriptions
b021fe5 config.h.in: Add missing package descriptions
5b05369 logbook update to SD template

Then tried to build locally and got these errors:

    LogbookHTML.cpp
C:\Users\fcgle\source\logbookkonni_pi\src\LogbookHTML.cpp(1): error C2059: syntax error: '<<' [C:\Users\fcgle\source\logbookkonni_pi\build\LogbookKonni_pi.vcxproj] [C:\Users\fcgle\source\logbookkonni_pi\build\tarball-build.vcxproj]
    CrewList.cpp
C:\Users\fcgle\source\logbookkonni_pi\src\CrewList.cpp(1): error C2059: syntax error: '<<' [C:\Users\fcgle\source\logbookkonni_pi\build\LogbookKonni_pi.vcxproj] [C:\Users\fcgle\source\logbookkonni_pi\build\tarball-build.vcxproj]
    boat.cpp

It appears this is part of some uncompleted merge. Does git not handle html very well? I fail to see the difference, so will just pick one and correct it.

<<<<<<< HEAD
/**
 * Copyright (c) 2011-2013 Konnibe
 * Copyright (c) 2013-2015 Del Edson
 * Copyright (c) 2015-2021 Peter Tulp
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

=======
/**
 * Copyright (c) 2011-2013 Konnibe
 * Copyright (c) 2013-2015 Del Edson
 * Copyright (c) 2015-2021 Peter Tulp
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

>>>>>>> d5cf4c9 (1.4.20.0 add android-pile)
rgleason commented 3 years ago

Fixed above, Now when building, I get this

C:\Users\fcgle\source\logbookkonni_pi\src\Logbook.cpp(65): error C2059: syntax error: '<<' [C:\Users\fcgle\source\logbookkonni_pi\build\LogbookKonni_pi.vcxproj] [C:\Users\fcgle\source\logbookkonni_pi\build\tarball-build.vcxproj]
C:\Users\fcgle\source\wxWidgets\include\wx/datetimectrl.h(29): error C2059: syntax error: 'public' [C:\Users\fcgle\source\logbookkonni_pi\build\LogbookKonni_pi.vcxproj] [C:\Users\fcgle\source\logbookkonni_pi\build\tarball-build.vcxproj]
C:\Users\fcgle\source\wxWidgets\include\wx/datetimectrl.h(30): error C2143: syntax error: missing ';' before '{' [C:\Users\fcgle\source\logbookkonni_pi\build\LogbookKonni_pi.vcxproj] [C:\Users\fcgle\source\logbookkonni_pi\build\tarball-build.vcxproj]
rgleason commented 3 years ago

After fixing that one and trying local build again.

 Building Custom Rule C:/Users/fcgle/source/logbookkonni_pi/CMakeLists.txt
  -- Creating tarball Logbook-1.4.20.0+2110301232.45f7cad_msvc-10.0.19042-win32.tar.gz
  -- Computing checksum in Logbook-1.4-msvc-10.0.19042.xml

So the question is, what did I do wrong? Why weren't these conflicts resolved in the PR merge and why did they even occur? Then when I git remote update origin why didn't it show up as conflicts?

rgleason commented 3 years ago

Loaded it and it works.

leamas commented 3 years ago

Those changes are related to wrong file endings ("wrong" as defined by .gitattributes). Similar things has occurred to me, but does go away once all files has the correct endings.

In short, it is a price we pay for having ignored these things up to now. git add --renormalize . is useful in these situations.

rgleason commented 3 years ago

Thanksfor the explanation Will add that git cmd to my notes.

leamas commented 3 years ago

Does git not handle html very well?

html is no difference for git. What you had here was probably introduced earlier. One can go back in the history to find the exact commit which added these markers using git bisect, but this is perhaps not part of the current git basic primer ;) As long as it not becomes a major problem, I suggest that you just solve it when it happens. That's what I do

rgleason commented 3 years ago

I've added it to my notes. Is it advisable to add --renormalize whenever I use git add?

leamas commented 3 years ago

NOt at all. Once you have done it and checked in the results it should be the last time.

rgleason commented 3 years ago

Good. Understood. Thanks.