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

Automating nonsense in the cpmgit gitlog #44

Closed
frodeseverin opened this issue Apr 8, 2014 · 1 comment
Closed

Automating nonsense in the cpmgit gitlog #44

frodeseverin opened this issue Apr 8, 2014 · 1 comment

Comments

@frodeseverin
Copy link

One of the recommendations in the Revision control Wiki is to use gibberish for the gitlog messages when committing in cpmgit.

I propose to automate this giberish using a command similar to this in the 'else' part of the if-clause in the cpmgit script:

git commit -m "$(cat /dev/urandom| tr -dc '0-9a-zA-Z!@#$%^&*_+-'|head -c 8)"

urandom extraction courtsey LinuxQuestions.org

I am by no means an expert in handling '/dev/urandom'. Please feel free to tune the line to perform properly. Perhaps 'dd' is a better tool than 'cat', as 'dd' can easily read a limited number of bytes from '/dev/urandom', and hence perform better. Something like

git commit -m "$(dd if=/dev/urandom bs=100 count=1 | tr -cd '[:alnum:]' | head -c 8)"

should do the trick?

@comotion
Copy link
Owner

comotion commented Oct 2, 2014

I like it. I have updated the wiki. This is not a place to optimize, but the dd variant uses a safer transliteration. It struck me as needful to make a script-to-make cpmgit repos. Would you like to contribute a script that sets up a cpmgit repository?

This issue was closed.
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