seandepagnier / weather_routing_pi

weather routing plugin for opencpn
GNU General Public License v3.0
47 stars 35 forks source link

Bad Date in Old Commit causes FlatPak to fail #258

Closed rgleason closed 4 years ago

rgleason commented 4 years ago

This is an oddball problem, that must be dealt with very carefully because the entire history of 3 years and many branches and forked repositories will become screwed up if it is not handled properly. Maybe there is no proper way to handle it --(That would also be useful to know.)

  1. https://github.com/rgleason/weather_routing_pi/commits/master-fix-time My recent commit "config.yml to build debian, macos, flatpak", debian builds, but it still fails for Flatpak and Macos even though the commit history is simpler.

  2. The object 23c07cc5d2be7ce68349f4b3719b6fa6fe90e0bf referred to in the output is a commit hash It is this commit "ui updates and other changes" by Sean api-1.16 @seandepagnier seandepagnier committed on Jun 19, 2152 1 parent c3d90e8 commit 23c07cc5d2be7ce68349f4b3719b6fa6fe90e0bf https://github.com/rgleason/weather_routing_pi/commit/23c07cc5d2be7ce68349f4b37 So this commit is here listed as June 19, 2152, as ui updates and other changes" coming directly above June 17, 2017 "update documentation" https://github.com/rgleason/weather_routing_pi/commit/9cc826fad70a57114e0b0f0f120f062648d8d14d Also found here and in several other branches!

  3. The information for changing the date of this commit is really not very complete and makes me want to confirm any action with someone very knowledgeable.

How to fix a old github commit date What do I have to do to fix this?

  1. Rewrite history.
  2. Remove that Commit completely and make an old backdated commit to replace it? (That changes history and all subsequent commits get screwed up.)
  3. Alternatively actually keep that commit and just change the date to be correct, so that history does not change and all subsequent commits are ok.

The problem is that this commit is too big and important! Is there a way to rebase and not screw everyting up?

rgleason commented 4 years ago

https://help.github.com/en/github/setting-up-and-managing-your-github-profile/troubleshooting-commits-on-your-timeline#how-github-uses-the-git-author-date-and-commit-date

Try this git command using the commit hash, to see the author, commit date etc.

git show 23c07cc5d2be7ce68 --pretty=fuller

rgleason commented 4 years ago

This procedural link is the process closest to what I would expect is necessary https://confluence.atlassian.com/bitbucketserverkb/how-do-you-make-changes-on-a-specific-commit-779171729.html

I am familiar with this process, but I would have to go back about 400 commits and even if it were done successfully in my local "master-fix-time" branch and then "git push origin +master-fix-time" what would happen to the other branches that used that commit that have a bad date? Also if I did it right would I have trouble with all the commits following that one in my "master-fix-time" branch?

I need this date fix to be in a public branch so that I can use CI and circleCI builds.

rgleason commented 4 years ago

I tried to fix this with a commit.

tried this:

git tag -a year 23c07cc

git show year

Tagger: Rick Gleason fcgleason@tgp-architects.com Date: Thu Dec 26 08:40:52 2019 -0600 Fix year to June 19, 2017

commit 23c07cc5d2be7ce68349f4b3719b6fa6fe90e0bf (tag: year, tag: show, stelian42/crossover, crossover) Author: Sean D'Epagnier seandepagnier@gmail.com Date: Sun Feb 7 06:28:56 2106 -40643156

ui updates and other changes

Previous commit is "improve UI and add polar editing" c3d90e8

so use

git rebase -i c3d90e8

in text editor put "edit" by 23c07cc ui updates and other changes

"edit 23c07cc ui updates and other changes"

git commit --amend --date="Sat, Jun 19 2017 06:28:56 +0000"

I then ran into all kinds of conflicts that had to be resolved and just decided to bail out with

git rebase --abort

My take is even if the commit date is totally wrong, don't mess with it.

Since Jon Gough got it building this does not appear to be a problem now. https://github.com/seandepagnier/weather_routing_pi/issues/259