termux/game-packages

Update 0verkill with my fork

ravener opened this issue · 12 comments

I forked 0verkill and I'm trying to hopefully continue development at https://github.com/ravener/0verkill

I fixed a critical bug with the md5 checksum which when running the server on different 32 bits vs 64 bits and the client on the other it's gonna break. The hashes were wrong. I fixed that and there are more things I'm gonna slowly improve I hope

Sure, can switch to the fork if you intend to continue development! You will need to create a tag in the repository before we can build from it.

Some comments:

  • Please keep the old git history, no reason to discard it
  • Just as a general tip, more informative git commit messages makes it easier for people to audit and help with the development (see https://chris.beams.io/posts/git-commit/)

Will create a tag soon.

I discarded git history just to make repository smaller (now i'd say it's a pain to add the history back if that's even possible without recreating repo) but i'll link to the original repo.

About commits yeah i'll improve them but for a start i was debugging an annoying bug that i had to keep pushing to test the change on a vps.

I discarded git history just to make repository smaller (now i'd say it's a pain to add the history back if that's even possible without recreating repo) but i'll link to the original repo.

This should do it

git remote add old_origin https://github.com/hackndev/0verkill
git fetch old_origin
git checkout FETCH_HEAD
git cherry-pick 7f3800e49acd0e8a924257de2ed39ef6bea73a3c..0ebefc64564c480105af59552a011de1c1d790ae
git branch -D master
git checkout -b master

and then force push to your repo.

I would prefer this so that information is not lost. git blame shows pretty useless info if most lines belong to an initial commit-commit for example

That uses master branch. Is it possible to swap branches to main instead? Since that's the new default these days.

Yeah, just replace master with main in the branch and checkout commands

I would prefer this so that information is not lost. git blame shows pretty useless info if most lines belong to an initial commit -commit for example

Well even then what I did is not compatible with the old history anymore. I went to refactor all the files, change whitespaces and more. Git would say 90% rewrite when i commit.

@Grimler91 ok i just made a v0.16 tag. Also applied the Makefile.in patches so it's not needed here anymore.

Also applied the Makefile.in patches so it's not needed here anymore.

Great! Going forward with future development you can also look at patches in other distros and see if it is worth applying them, gento have some here for example.


Sorry, but I do not want to switch the repository source if the fork does not contain the old git history.

Well even then what I did is not compatible with the old history anymore. I went to refactor all the files, change whitespaces and more. Git would say 90% rewrite when i commit.

git allows you to blame beyond commits as well (see for example this) so that is not a problem. Importing as a single commit is though.

Keeping the old history makes it easier to see the logic in how the game was developed, and it shows who the original authors of individual commits were which is a nice gesture to them. There is no reason to not import the history (maybe if the original repository was multiple GB in size, but that is not the case here).


If you have any questions on git usage or similar then please ask and I'll try to help.

@Grimler91 i tried doing your commands but i'm currently in a state where all files are reset. So i don't get how this adds history while keeping my changes.

What error did you get exactly?

Looks like you had already done changes in the initial commit (rather than just importing the old repository), and in that case the cherry-picking will not work (due to conflicts).

To abort the current cherry-pick command, run git cherry-pick --abort, and then we can cherry-pick the initial commit and tell git to automatically resolve conflicts so you get your repo with --strategy-option theirs

git cherry-pick --abort
git cherry-pick  7f3800e49acd0e8a924257de2ed39ef6bea73a3c --strategy-option theirs

I see that your initial commit added a file named "gay.txt". This looks very unprofessional, and is visible for everyone through the git history forever. If I were you I would remove this file from the git history at this point with

git rm gay.txt
git commit --amend

and refrain from using weird names for temporary files in the future.

The rest of the commits should now apply without conflicts when we run

git cherry-pick 7f3800e49acd0e8a924257de2ed39ef6bea73a3c..0ebefc64564c480105af59552a011de1c1d790ae

and finally we can replace the main branch

git branch -D main
git checkout -b main

I guess it's in a broken state rn

~/0verload   main   git cherry-pick --abort
warning: You seem to have moved HEAD. Not rewinding, check your HEAD!

gonna have to reclone.

About that gay.txt file, yeah i'm sorry you had to see that. I was debugging (and was hella annoyed) and totally forgot to delete it when i was pushing.

ok it's too late for today but i'll definitely give it a try tomorrow. Thanks.

@Grimler91 I fixed it. Just recloned the original repo and copied over my changes. Reset my own history this way as well. Will be more careful moving forward from here on, thanks for the tips.