You are not logged in.
Pages: 1
Like for instance, anyone know commands to search throughout an entire source code for all mentions of python, or in my case python2.7
So I can find and make corrections.
In all files I might add within source code.
Last edited by zapper (2024-09-27 02:04:29)
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
Are you talking about just grepping the current commit, or are you talking about finding *all* occurrences of something including historical occurrences that no longer exist in the current commit?
Online
For the former, just a regular grep will do, maybe with -r if you want to recursively grep everything:
grep -r my_regex ./*
For the latter, `git grep` is your friend:
git grep my_regex $(git rev-list --all)
Online
@quickfur I found one also recently, I am not sure if the 2nd you have works, but I found this:
git rev-list --all | xargs git grep -F python2.7
This one works for sure.
EDIT: your 2nd one also works.
The first one doesn't though last I tried it.
Last edited by zapper (2024-09-28 23:41:25)
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
Pages: 1