Loading hosts sources in a git submodule
See original GitHub issueHi, First off, lots of thanks to your project and all data providers! I have been a long time user and have recently started to contribute back.
Currently, I suppose your workflow is the following: Every few days, you run the updateHostsFile.py
in your local git repo and then push it to this online repo. However, when users (who) clone your repo (even a shallow clone), they receive the python scripts among other things as well as the hosts sources in the data
and alternate
folders. As such, I, for instance, want to keep (only) the code in the scripts up to date with this repo and hence run git pull
every few days. However, running updateHostsFile.py
locally for me introduces new changes which often cause conflicts when I git pull
again. Of course, this can be solved by making a fresh clone of the repo (via git reset
for instance); but this seems like a hacky way to do it.
My point being that, I think it will be a good addition to separate the hosts sources from the actual python engine (script) which does the actual work. A good way to tackle this can be to use git submodules for this purpose. So, to spell it out, (as I have it in my mind) the main python scripts, tests, etc could be in one repo and the hosts sources (content) will be another repo added to the former as a git submodule. This can also give a solution to #272 .
I am willing to write the code for a blueprint / final version of this idea. Please let me know what you think of the idea. Also, on another note, do you have a communication platform (IRC / Telegram / Riot)? I wanted to ask this there first, but couldn’t find any.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
I see your point. In fact, if one uses git submodules the process for cloning the repo (just as any user does now) and updating it (using git pull, for instance) stays essentially the same (except for changes in some commands of course).
On the other hand, advanced users can update hosts files on their machines daily (every few hours, etc). If you feel that’s overkill, it’s okay. I had the idea that this repo was supposed to be a “download this script and run daily on your own” sort of thing.
Also, if one decides to have different extensions, and use this repo’s script, there is some gitfu to be done in the current setup if they update sources on their own. Anyway, git submodules do have some things to take care of, that I agree.
I hope my problem was clear regardless.
Closing.