Skip to content
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

locks up forever on init.sh on RHEL linux releases / wrong instructions / bad location / bad name #11

Open
gitcnd opened this issue Nov 11, 2023 · 5 comments

Comments

@gitcnd
Copy link
Contributor

gitcnd commented Nov 11, 2023

my "ps" says it's locked up at "cat".

dodgy bash script probably?

Also - instructions seem wrong?

Copy git-meta.sh and init.sh into your repo

seems like a less-than-ideal idea to stick the script in the repo itself? Shouldn't this be in /usr/local/bin/ ?

/usr/bin is the wrong place to put local scripts

init.sh is a bad name. should be git-meta-init.sh or something more sensible.

this is not portable (centos/redhat/etc):
sudo apt install

it's also a bad idea to install stuff without asking or checking if it's already there anyhow. Don't do that - just tell people it's a dependency, and stop if it's missing.

@gitcnd
Copy link
Contributor Author

gitcnd commented Nov 11, 2023

This is your mistake:-

cat > .git/hooks/pre-commit <<EOF

(missing backslash) should be

cat > .git/hooks/pre-commit <<\EOF

@gitcnd
Copy link
Contributor Author

gitcnd commented Nov 11, 2023

has this in your installer

sudo cp -f git-meta /usr/bin/

but has this in your hooks:

bash .git/hooks/git-meta --store

... those are not the same place...

@gitcnd
Copy link
Contributor Author

gitcnd commented Nov 11, 2023

also does not have any restore hooks

@danimesq
Copy link
Member

danimesq commented Nov 11, 2023

Hello @gitcnd 👋

Here myself facing the same issue of the init hanging; but still hadn't time to fix this and, plus, the issues you've just reported.

Thank you for taking your time to try this script and find my mistakes on it; hopefully I'll fix these right this year.
But feel free to submit a PR in the meantime; that would be quite appreciated, and I hope you've fixed these issues on your side and. now enjoying this tool working and preserving your files' metadata.

Please note I've recently introduced breaking changes (presenting the .gitmeta-cid file), starting from the commit fc4e662 (with the help of CursorGPT, as my time nows' quite limited compared to 2021 and StackOverflow can become a hell).
The idea for these recent changes is to make a workaround to scale Git's MD-1 hashes into a safer (and nicer) one.
Once it gets sorted out and fully working, the next step is a experimental feature for signing commits with a cryptocurrency key (in this case Ethereum) instead of GPG/PGP, for the punker ones.
But both should be opt-in, as working on a repo will take longer in checksums better than MD-1.

BTW, the endgame for git-meta is being able to apply the repo's .git-meta metadata at checkout!

@gitcnd
Copy link
Contributor Author

gitcnd commented Nov 11, 2023

I re-wrote the entire thing: it's here, tested, working nicely

https://github.com/gitcnd/git-meta

I also added a feature I like:

https://www.instructables.com/How-to-Use-git-on-Your-Own-Machines-to-Manage-Web-/

danimesq added a commit that referenced this issue Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants